JavaScript UI Libraries & Blazor Components Suite – Smart UI › Forums › ListBox › Sorted by default? › Reply To: Sorted by default?
January 11, 2019 at 10:24 am
#99426
admin
Keymaster
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