Different display value for selecte text using select2.js

后端 未结 5 2138
闹比i
闹比i 2021-01-18 15:24

Trying to implement a custom select dropdown using select2 plugin Is it possible to have the selected value to display only the actual option \'value\' instead of the text,

5条回答
  •  无人共我
    2021-01-18 15:52

    Drop down actually has two parts one is Text and other is Value. Text is for user point of view and Value is used by developer for his/her use. If you want to display value then as I think your end user should be able to get what actually the displayed value means, with this consideration what I will suggest you is to have both Text and Value as same only(as that of value in above).

提交回复
热议问题