Open Closed

ABP autocomplete based on input value #6979


User avatar
0
rohit.jadhav created

Is it possible to populate the dropdown based on another dropdown selected value ?

Ex: if we use auto complete to list all cities based on a selected country in another dropdown, is it possible to do it in ABP ?

The below documentation does not mention about it.

https://docs.abp.io/en/abp/latest/UI/AspNetCore/AutoComplete-Select

Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

1 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Fullstack Developer

    Hi,

    You can use select2: https://select2.org/data-sources/ajax#request-parameters

    Add parameters in AJAX request:

    $('#mySelect2').select2({
      ajax: {
        url: 'https://api.github.com/orgs/select2/repos',
        data: function (params) {
          var query = {
            filter: params.term,
            country: $("#country").val() // your country selected value
          }
    
          return query;
        }
      }
    });
    
    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
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.8.0-preview. Updated on September 09, 2026, 11:56
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.