@lemonadejs/dropdown 3.1.5 → 3.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +3 -3
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -261,7 +261,7 @@ if (!Modal && typeof (require) === 'function') {
261
261
  let onchange = self.onchange;
262
262
 
263
263
  // Cursor controllers
264
- const setCursor = function(index) {
264
+ const setCursor = function(index, force) {
265
265
  let item = self.rows[index];
266
266
 
267
267
  if (typeof(item) !== 'undefined') {
@@ -270,7 +270,7 @@ if (!Modal && typeof (require) === 'function') {
270
270
  // Set visual indication
271
271
  item.cursor = true;
272
272
  // Go to the item on the scroll in case the item is not on the viewport
273
- if (! (item.el && item.el.parentNode)) {
273
+ if (! (item.el && item.el.parentNode) || force === true) {
274
274
  // Goto method
275
275
  self.goto(item);
276
276
  }
@@ -481,7 +481,7 @@ if (!Modal && typeof (require) === 'function') {
481
481
  // Move to the correct position
482
482
  if (v) {
483
483
  // Mark the position of the cursor to the same element
484
- setCursor(self.rows.indexOf(v));
484
+ setCursor(self.rows.indexOf(v), true);
485
485
  }
486
486
  // Prepare search field
487
487
  if (self.autocomplete) {
package/package.json CHANGED
@@ -14,10 +14,10 @@
14
14
  "javascript plugins"
15
15
  ],
16
16
  "dependencies": {
17
- "lemonadejs": "^4.0.7",
17
+ "lemonadejs": "^4.1.0",
18
18
  "@lemonadejs/modal": "^2.7.1"
19
19
  },
20
20
  "main": "dist/index.js",
21
21
  "types": "dist/index.d.ts",
22
- "version": "3.1.5"
22
+ "version": "3.1.6"
23
23
  }