Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for datalist control #1825

Open
tomasherceg opened this issue Jun 4, 2024 · 0 comments
Open

Support for datalist control #1825

tomasherceg opened this issue Jun 4, 2024 · 0 comments

Comments

@tomasherceg
Copy link
Member

HTML allows specifying <datalist> component with a list of <option> elements. We should have a DataList control in DotVVM.

Since it does not have a concept of selected values, we cannot use the classes Selector or SelectorBase.
However, we will need to have it the DataSource property and ItemTextBinding, which would extract the display value in case the data source contains a collection of objects.

Then, we can add the List property to the TextBox control, which would receive the ID of the associated DataList control, and do the trick. The usage would look like this:

<dot:TextBox Text="{value: Currency}" List="currencies" />
<dot:DataList ID="currencies" DataSource="{value: CurrencyList}" ItemTextBinding="{value: Code}" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant