Skip to content

Commit

Permalink
Fix placeholder text when useLabels: false and 0 selected
Browse files Browse the repository at this point in the history
  • Loading branch information
jlukic committed Aug 18, 2015
1 parent c43ea73 commit ade6ab5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
- **Dropdown** - Dropdown will no longer fire native `onchange` event on hidden input when setting value during initial load (unless `fireOnInit: true`) #2795 **Thanks @lauri-elevant**
- **Dropdown** - Fixed issue where `forceSelection` would not occur when `pageLostFocus` (clicked into another tab and back)
- **Dropdown** - Fixed issue where using the specific value `value="false"` would cause an option to not be removable from a multiple select
- **Dropdown** - When `useLabels: false` placeholder text will now show up when 0 items selected, instead of the text "0 items selected"
- **Dropdown/Tab** - Fixed an instance where `metadata` was not referencing settings metadata value
- **Form Validation** - Fixed issue with `get value(s)` where unchecked checkboxes would not correctly retrieve values
- **Input** `action input` and `labeled input` now have focused border on inner edge with label/button
Expand Down
7 changes: 6 additions & 1 deletion src/definitions/modules/dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -2550,7 +2550,12 @@ $.fn.dropdown = function(parameters) {
}
else {
module.remove.value(selectedValue, selectedText, $selected);
module.set.text(module.add.variables(message.count));
if(module.get.selectionCount() === 0) {
module.set.placeholderText();
}
else {
module.set.text(module.add.variables(message.count));
}
}
}
else {
Expand Down

0 comments on commit ade6ab5

Please sign in to comment.