Would be nice but...
The options list can't be styled (or can it?)
A datalist and associated input element are associated via the id
attribute. You can very easily "break the rules" by having more than one
element with the same id. Think: transclude your tiddler {{DataList Feature
in Edit-Text Widget}} and you have TWO copies with the same id.
I don't think there's a way to use datalist elements without an id. :/
On Wednesday, September 18, 2019 at 4:05:50 PM UTC-5, Alan Aldrich wrote:
>
> 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
>
--
You received this message because you are subscribed to the Google Groups
"TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywikidev/ecb9d4bd-e3ca-4255-abe0-2f90aea3fe38%40googlegroups.com.