BEST
DEALS
OF THE
YEAR!
SAVE UP TO $3,000
24 NOV
1 DEC
00 Days
00 Hrs
00 Min
00 Sec
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!
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.1.0-preview. Updated on November 20, 2025, 09:12
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.