This topic contains 2 replies, has 2 voices, and was last updated by Anonymous 2 years, 3 months ago.
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic.
HTML Elements › Forums › Forms & Editors › ListBox › Sorted by default?
Tagged: custom elements, list box, smart-list-box, sort, sort by default, sorted list box, sorting items, web components
This topic contains 2 replies, has 2 voices, and was last updated by Anonymous 2 years, 3 months ago.
Hi,
Is it possible for the list box to be sorted by default?
Best regards,
Mike
Hi Michael20,
yes it is. Just set the sorted attribute on the tag of the element and the items will be sorted by default. Here’s an example:
<smart-list-box sorted>
<smart-list-item>Z</smart-list-item>
<smart-list-item>A</smart-list-item>
<smart-list-item>G</smart-list-item>
</smart-list-box>
Best Regards,
Christopher
Smart HTML Elements Team
https://www.htmlelements.com
Thank you very much!
Best regards,
Mike
You must be logged in to reply to this topic.