ng-multiselect-dropdown
ng-multiselect-dropdown copied to clipboard
Feature Request: Display idField instead of textField for selected items
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.
+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' }
];
+1
Team Please Support us on the above case.