I’m trying to use the ‘list’ argument for the dash ‘Input’ component. The ‘help’ information shows the below…
| - list (string; optional): Identifies a list of pre-defined options to suggest to the user.
| The value must be the id of a element in the same document.
| The browser displays only options that are valid values for this
| input element.
| This attribute is ignored when the type attribute’s value is
| hidden, checkbox, radio, file, or a button type.
Therefore, I’m trying to add a Datalist element as well to house the ‘suggestions’ to my input component. However, I’m unable to get my input component to show any suggestions. My code is below… this actually allows me to use the input component to control many other components but without suggestions.
html.Datalist(id='list-data', children=list(numpy.unique(df['DATA']))), html.Div([ dcc.Input(id='list-input', placeholder='Enter a CUSIP...', type='text', value='ABC', list='list-data' ) ]),
I couldn’t find any examples in the various galleries. I also tried setting the list within Datalist to ‘values’ or ‘options’ like you might in a Dropdown component but its not a valid argument. Has anyone gotten this to work so far?
I’m guessing its a misunderstanding on my end with how to interact with the html reach components.