Feature Request: Datalist functionality for EditText Widget (auto-complete)

47 views
Skip to first unread message

Alan Aldrich

unread,
Sep 18, 2019, 4:40:46 PM9/18/19
to tiddl...@googlegroups.com
Please correct me if this is not the correct venue to discuss core changes. I considered forking TW on Github and sending a pull request, but I wanted to share this idea first, as discussion may lead to further solutions. 

One frustration I have with the current implementation of auto-completion in a text box is the inability to select from choices with the arrow keys or select the first option with the enter key. It occurred to me recently that TiddlyWiki does not utilize the HTML5 element <datalist>, but with very minimal code change it could. I propose we add a new optional parameter to the EditText Widget called "list". This simple modification will allow the user to associate a <datalist> of <options> for an auto-complete drop-down that responds to keystrokes. 

I have created a demonstration here: http://alans-sandbox.tiddlyspot.com/

More information about the datalist element: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/datalist

I have noted some limitations of this method in the demo. The search field in the demo has also been modified to support this method, but it is not a perfect solution. I am not proposing we replace the search mechanism at this time, but I hope this thread gets people thinking about it.

Please try out my example or drag the two modified system tiddler links into your own wiki to experiment. I look forward to hearing your thoughts,
Respectfully,
Alan

P.S. link fixed

Mat

unread,
Sep 18, 2019, 4:50:37 PM9/18/19
to TiddlyWiki
Alan Aldrich wrote:
Please correct me if this is not the correct venue to discuss core changes.

I'd say this is for the dev group

<:-)

Alan Aldrich

unread,
Sep 18, 2019, 5:06:31 PM9/18/19
to TiddlyWiki
Reply all
Reply to author
Forward
0 new messages