From 32d47d60ef9b6da6db9a3e19afe71c7a717fbe04 Mon Sep 17 00:00:00 2001 From: Jack Date: Sun, 28 Jan 2018 22:36:42 -0800 Subject: [PATCH] #3432 Simplifies setting name (derp), adds default to false --- RELEASE-NOTES.md | 1 + src/definitions/modules/dropdown.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 7f1744a9f..c4d471b49 100755 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -11,6 +11,7 @@ - **Button** - Youtube's red color now matches their current brand guidelines **Thanks @hammy2899** #6110 - **Flag** - Adds missing flag for England **Thanks @zyzniewski** #5944 - **Reveal** - `ribbon label` can now work with `reveal` #5681 +- **Dropdown** - Added new setting `ignoreCase` (defaults to false) that will prevent values from being added that match existing values (case insensitive). This is particularly useful when using allowAdditions for tagging to not allow case insensitive matches. **Bugs** - **Dropdown** - Fixed issue where dropdownsdown could incorrectly open upward and leftward opening when using `context` setting due to an incorrect offset calculation. **Thanks @dannyBies** #5974 #5366 diff --git a/src/definitions/modules/dropdown.js b/src/definitions/modules/dropdown.js index a82cf87e8..82f87f336 100644 --- a/src/definitions/modules/dropdown.js +++ b/src/definitions/modules/dropdown.js @@ -3061,7 +3061,7 @@ $.fn.dropdown = function(parameters) { return (module.get.query() !== ''); }, value: function(value) { - return (settings.ignoreAdditionCase) + return (settings.ignoreCase) ? module.has.valueIgnoringCase(value) : module.has.valueMatchingCase(value) ; @@ -3694,7 +3694,7 @@ $.fn.dropdown.settings = { forceSelection : true, // force a choice on blur with search selection allowAdditions : false, // whether multiple select should allow user added values - ignoreAdditionCase : true, // whether to ignore case when adding a user selection + ignoreCase : false, // whether to consider values not matching in case to be the same hideAdditions : true, // whether or not to hide special message prompting a user they can enter a value maxSelections : false, // When set to a number limits the number of selections to this count