Hi Alan,
The `id` attribute is not a good idea and I am sure it will be rejected!
If you need a separate datalist with id then they will say use the currect
selectwidget!
One idea may be to use <$edit-text> list goes here </$edit-text>
It should have a simple syntax!
--Mohammad
On Thursday, September 19, 2019 at 2:28:27 AM UTC+4:30, Alan Aldrich wrote:
>
> coda coder,
> Yes the *id* attribute is required for the datalist element to work. It
> must match the *list* attribute of the input element generated by the
> EditText Widget. I am requesting we modify the EditText Widget to include a
> parameter called *list *to allow the use of <datalist>.
>
> On Wednesday, September 18, 2019 at 4:41:48 PM UTC-5, coda coder wrote:
>>
>> 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/1256d7d3-351f-4568-a943-b9639ba40567%40googlegroups.com.