BigW Consortium Gitlab

Commit a7d7e9a5 by Alfredo Sumaran

Set default label if user unselects the option from dropdown

parent 4a4d8608
...@@ -10,8 +10,12 @@ ...@@ -10,8 +10,12 @@
selectable: true, selectable: true,
inputId: $dropdown.data('input-id'), inputId: $dropdown.data('input-id'),
fieldName: $dropdown.data('field-name'), fieldName: $dropdown.data('field-name'),
toggleLabel(item) { toggleLabel(item, el) {
return item.text; if (el.is('.is-active')) {
return item.text;
} else {
return 'Select';
}
}, },
clicked(item, $el, e) { clicked(item, $el, e) {
e.preventDefault(); e.preventDefault();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment