ng-multiselect-dropdown icon indicating copy to clipboard operation
ng-multiselect-dropdown copied to clipboard

Feature Request: Display idField instead of textField for selected items

Open roberi opened this issue 5 years ago • 2 comments

Is it possible to display, in the input field, the value of idField instead of the value of textField for selected items? Let's say I have this data:

this.dropdownList = [
      { item_id: 1, item_text: 'Mumbai' },
      { item_id: 2, item_text: 'Bangaluru' },
      { item_id: 3, item_text: 'Pune' },
      { item_id: 4, item_text: 'Navsari' },
      { item_id: 5, item_text: 'New Delhi' }
    ];

What I want is to display the value of item_id in the input field instead of the item_text. The item_text should still be displayed in the dropdown list. If the user has selected item with item_id 1 and 3 I want the input filed to display 1 and 3 instead of Mumbar and Pune.

Any help is appreciated.

roberi avatar Aug 05 '20 14:08 roberi

+1

The use case I have is that I am displaying languages as shown below. I would like to show the full language name in the drop down, but only the language code once selected.

this.dropdownList = [
      { item_id: 'DE', item_text: 'DE - German' },
      { item_id: 'EN', item_text: 'EN - English' },
      { item_id: 'ES', item_text: 'ES - Spanish' },
      { item_id: 'FR', item_text: 'FR - French' },
      { item_id: 'IT', item_text: 'IT - Italian' }
    ];

sw-tracker avatar Apr 06 '21 10:04 sw-tracker

+1

Team Please Support us on the above case.

Rajsekar89 avatar May 24 '21 11:05 Rajsekar89