Starts in:
3 DAYS
11 HRS
57 MIN
29 SEC
Starts in:
3 D
11 H
57 M
29 S
Open Closed

Refreshing Select2 Data and Retaining Selected Options #5229


User avatar
0
dan@dancaron.com created

I am using the abp.io Select2 auto-complete-select. How do I refresh the "available options" data from the Select2 box without clearing out any selected options?

I have a use case where the list of available options changes **after ** the user has clicked the drop-down to retrieve the list of available options (i.e. they can create a new item while on the screen - so I need to refresh the data (available options) so the new item is there - but I need to retain any selected items).

<select id="TagsLookup" asp-for="Message.TagIds" class="auto-complete-select" multiple="multiple" style="width: 100%" data-autocomplete-api-url="/api/mymodule/messages/item-lookup" data-autocomplete-display-property="displayName" data-autocomplete-value-property="id" data-autocomplete-items-property="items" data-autocomplete-filter-param-name="filter"> </select>


No answer yet!
Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06