问题描述:

Is there a possibility to customize the message of dropdown allowAdditions?

By default is just "add". But I want to give the user some template for the input, like "add (first and last name):".

 $('.ui.dropdown').dropdown('setting', {

allowAdditions: true,

action: 'combo'

});

Here is a fiddle https://jsfiddle.net/xnjfzpw5/

Any help with this? Thanks in advance.

网友答案:

semantic.js defines several default messages. You may search the library for "message: {" ;-)

To customize the message , you could override the default message. But actually better to use the settings, like:

$('.ui.dropdown').dropdown('setting', {
    allowAdditions: true,
    message: {addResult:'Here your customized message: <b>{term}</b>'},
    action: 'combo'
  });

See the modified fiddle and have a nice day!

相关阅读:
Top