JavaScript UI Libraries & Blazor Components Suite – Smart UI › Forums › DropDownList › adding new item at the end
hello –
it appears the only way to add a new item is by using insert or insertBefore
https://www.htmlelements.com/demos/dropdownlist/basic/#toc-insert
but what if i want to add at the end? right now i am just using ‘999’ as my insert position.
is there a better way?
Hi,
You may get the items length and use that length as a position. This way you will add the new item at the end. Here is an example: https://codepen.io/svetoslavb04/pen/JjexBYo
Best Regards, Svetoslav Borislavov
Smart UI Team https://www.htmlelements.com/