@danielgindi/selectbox 1.0.69 → 1.0.70

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.
package/dist/lib.umd.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @danielgindi/selectbox 1.0.69
2
+ * @danielgindi/selectbox 1.0.70
3
3
  * git://github.com/danielgindi/selectbox.git
4
4
  */
5
5
  (function (global, factory) {
@@ -9675,6 +9675,7 @@
9675
9675
  * @property {boolean|'touch'} [blurOnSingleSelection='touch']
9676
9676
  * @property {boolean} [multi=false] can multiple values be selected?
9677
9677
  * @property {boolean} [showSelection=true] show selection? if false, the placeholder will take effect
9678
+ * @property {boolean} [showPlaceholderInTooltip=false] show placeholder in title attribute
9678
9679
  * @property {function(items: DropList.ItemBase[]):string} [multiPlaceholderFormatter] formatter for placeholder for multi items mode
9679
9680
  * @property {boolean} [searchable=false] is it searchable?
9680
9681
  * @property {string} [noResultsText='No matching results'] text for no results (empty for none)
@@ -9718,6 +9719,7 @@
9718
9719
  blurOnSingleSelection: 'touch',
9719
9720
  multi: false,
9720
9721
  showSelection: true,
9722
+ showPlaceholderInTooltip: false,
9721
9723
  multiPlaceholderFormatter: null,
9722
9724
  searchable: true,
9723
9725
  noResultsText: 'No matching results',
@@ -9808,6 +9810,7 @@
9808
9810
  blurOnSingleSelection: o.blurOnSingleSelection,
9809
9811
  multi: o.multi,
9810
9812
  showSelection: o.showSelection,
9813
+ showPlaceholderInTooltip: o.showPlaceholderInTooltip,
9811
9814
  multiPlaceholderFormatter: o.multiPlaceholderFormatter,
9812
9815
  searchable: o.searchable,
9813
9816
  noResultsText: o.noResultsText,
@@ -10409,7 +10412,7 @@
10409
10412
  if (p.showSelection === showSelection)
10410
10413
  return this;
10411
10414
 
10412
- this._p.showSelection = showSelection;
10415
+ p.showSelection = showSelection;
10413
10416
  this._scheduleSync('full');
10414
10417
  return this;
10415
10418
  }
@@ -10421,6 +10424,28 @@
10421
10424
  return this._p.showSelection;
10422
10425
  }
10423
10426
 
10427
+ /**
10428
+ * @param {boolean} showPlaceholderInTooltip
10429
+ * @returns {SelectBox}
10430
+ */ }, { key: "setShowPlaceholderInTooltip", value:
10431
+ function setShowPlaceholderInTooltip(showPlaceholderInTooltip) {
10432
+ var p = this._p;
10433
+ showPlaceholderInTooltip = !!showPlaceholderInTooltip;
10434
+ if (p.showPlaceholderInTooltip === showPlaceholderInTooltip)
10435
+ return this;
10436
+
10437
+ p.showPlaceholderInTooltip = showPlaceholderInTooltip;
10438
+ this._scheduleSync('full');
10439
+ return this;
10440
+ }
10441
+
10442
+ /**
10443
+ * @returns {boolean}
10444
+ */ }, { key: "isShowPlaceholderInTooltipEnabled", value:
10445
+ function isShowPlaceholderInTooltipEnabled() {
10446
+ return this._p.showPlaceholderInTooltip;
10447
+ }
10448
+
10424
10449
  /**
10425
10450
  * @param {function(items: DropList.ItemBase[]):string} formatter
10426
10451
  * @returns {SelectBox}
@@ -10431,7 +10456,7 @@
10431
10456
  if (p.multiPlaceholderFormatter === formatter)
10432
10457
  return this;
10433
10458
 
10434
- this._p.multiPlaceholderFormatter = formatter;
10459
+ p.multiPlaceholderFormatter = formatter;
10435
10460
  this._scheduleSync('full');
10436
10461
  return this;
10437
10462
  }
@@ -10445,7 +10470,7 @@
10445
10470
  if (p.blurOnSingleSelection === value)
10446
10471
  return this;
10447
10472
 
10448
- this._p.blurOnSingleSelection = value;
10473
+ p.blurOnSingleSelection = value;
10449
10474
  return this;
10450
10475
  }
10451
10476
 
@@ -12206,6 +12231,12 @@
12206
12231
 
12207
12232
  // Set input placeholder
12208
12233
  p.input.setAttribute('placeholder', placeholder);
12234
+
12235
+ if (p.showPlaceholderInTooltip) {
12236
+ p.input.setAttribute('title', placeholder);
12237
+ } else {
12238
+ p.input.removeAttribute('title');
12239
+ }
12209
12240
  }
12210
12241
 
12211
12242
  /** @private */ }, { key: "_syncSingleItem", value: