Browse Source

Rename selectonShortcut

pull/3763/merge
Jack Lukic 8 years ago
parent
commit
7c01d212b8
2 changed files with 6 additions and 6 deletions
  1. 2
      RELEASE-NOTES.md
  2. 10
      src/definitions/modules/dropdown.js

2
RELEASE-NOTES.md

@ -8,7 +8,7 @@
- **Form Validation** - Added ability for field validation to depend on other fields being filled out
- **Popup** - Added new setting `boundary` and `scrollContext`. `boundary` lets you specify an element that the popup will try to position itself to be contained inside of. `scrollContext` lets you specify the element which when scrolled should hide the popup
- **Popup** - Added new settings `autoRemove`, which is enabled by default. This will add special event listeners to auto hide a popup if the triggering element is removed from the DOM. This is useful in controlled DOM environments like Meteor/Ember/React to ensure a popup auto-hides itself when a page navigation or other DOM change occurs that may not trigger `mouseout`.
- **Dropdown** - Dropdown now changes user selection on keyboard shortcuts **immediately**, this will save the extra `enter` key press to confirm selection in most cases. To enable previous pre `2.2` selection style use the setting `selectOnShortcut: false`
- **Dropdown** - Dropdown now changes user selection on keyboard shortcuts **immediately**, this will save the extra `enter` key press to confirm selection in most cases. To enable previous pre `2.2` selection style use the setting `selectOnKeydown: false`
- **Dropdown** - Multiple select dropdown now sizes current dropdown input based on rendered width of a hidden element, not using an estimate based on character count. This means search will never break to a second line earlier than would normally fit in current line.
- **Dropdown** - Added new setting for search selection `hideAdditions` this will remove showing user additions inside the menu, making for a more intuitive adding process. Dropdowns now have a new state `empty` which will format an active dropdown with empty results. #3791
- **Dropdown** - Adds new `allowReselection` option to trigger `onChange` events even when reselecting same value ***NEEEDS DOCUMENTATION***

10
src/definitions/modules/dropdown.js

@ -1332,7 +1332,7 @@ $.fn.dropdown = function(parameters) {
.addClass(className.selected)
;
module.set.scrollPosition($nextItem);
if(settings.selectOnShortcut && module.is.single()) {
if(settings.selectOnKeydown && module.is.single()) {
module.set.selectedItem($nextItem);
}
}
@ -1359,7 +1359,7 @@ $.fn.dropdown = function(parameters) {
.addClass(className.selected)
;
module.set.scrollPosition($nextItem);
if(settings.selectOnShortcut && module.is.single()) {
if(settings.selectOnKeydown && module.is.single()) {
module.set.activeItem($nextItem);
module.set.selected(module.get.choiceValue($nextItem), $nextItem);
}
@ -2071,7 +2071,7 @@ $.fn.dropdown = function(parameters) {
$nextSelectedItem
.addClass(className.selected)
;
if(settings.selectOnShortcut && module.is.single()) {
if(settings.selectOnKeydown && module.is.single()) {
module.set.selectedItem($nextSelectedItem);
}
$menu
@ -2260,7 +2260,7 @@ $.fn.dropdown = function(parameters) {
module.set.scrollPosition($nextValue);
$selectedItem.removeClass(className.selected);
$nextValue.addClass(className.selected);
if(settings.selectOnShortcut && module.is.single()) {
if(settings.selectOnKeydown && module.is.single()) {
module.set.selectedItem($nextValue);
}
}
@ -3417,7 +3417,7 @@ $.fn.dropdown.settings = {
apiSettings : false,
selectOnShortcut : true, // Whether selection should occur automatically when keyboard shortcuts used
selectOnKeydown : true, // Whether selection should occur automatically when keyboard shortcuts used
minCharacters : 0, // Minimum characters required to trigger API call
saveRemoteData : true, // Whether remote name/value pairs should be stored in sessionStorage to allow remote data to be restored on page refresh
throttle : 200, // How long to wait after last user input to search remotely

Loading…
Cancel
Save