@danielgindi/selectbox 1.0.49 → 1.0.50
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.cjs.js +18 -13
- package/dist/lib.cjs.js.map +1 -1
- package/dist/lib.cjs.min.js +2 -2
- package/dist/lib.cjs.min.js.map +1 -1
- package/dist/lib.es6.js +18 -13
- package/dist/lib.es6.js.map +1 -1
- package/dist/lib.es6.min.js +2 -2
- package/dist/lib.es6.min.js.map +1 -1
- package/dist/lib.umd.js +18 -13
- package/dist/lib.umd.js.map +1 -1
- package/dist/lib.umd.min.js +2 -2
- package/dist/lib.umd.min.js.map +1 -1
- package/lib/DropList.js +17 -12
- package/package.json +1 -1
package/dist/lib.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @danielgindi/selectbox 1.0.
|
|
2
|
+
* @danielgindi/selectbox 1.0.50
|
|
3
3
|
* git://github.com/danielgindi/selectbox.git
|
|
4
4
|
*/
|
|
5
5
|
'use strict';
|
|
@@ -5634,14 +5634,14 @@ var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
|
5634
5634
|
|
|
5635
5635
|
/**
|
|
5636
5636
|
* @typedef {Object} DropList.PositionOptions
|
|
5637
|
-
* @property {Element} [target] Target element to act as anchor
|
|
5638
|
-
* @property {{left: number, top: number}} [targetOffset
|
|
5639
|
-
* @property {number} [targetHeight
|
|
5640
|
-
* @property {number} [targetWidth
|
|
5641
|
-
* @property {DropList.PositionAnchor} [position
|
|
5642
|
-
* @property {DropList.PositionAnchor} [anchor
|
|
5643
|
-
* @property {boolean} [updateWidth=false]
|
|
5644
|
-
* @property {string} [targetRtl
|
|
5637
|
+
* @property {Element?} [target] Target element to act as anchor
|
|
5638
|
+
* @property {{left: number, top: number}?} [targetOffset] Override the offset of target. Automatically calculated if unspecified.
|
|
5639
|
+
* @property {number?} [targetHeight] Override height of the target
|
|
5640
|
+
* @property {number?} [targetWidth] Override width of the target
|
|
5641
|
+
* @property {DropList.PositionAnchor?} [position]
|
|
5642
|
+
* @property {DropList.PositionAnchor?} [anchor]
|
|
5643
|
+
* @property {boolean|number?} [updateWidth=false] `true` to set width of the menu according to `target`'s width, or specify an arbitrary number.
|
|
5644
|
+
* @property {string?} [targetRtl] Override for rtl mode of the target
|
|
5645
5645
|
* @property {{x: number, y: number}} [offset=undefined] Extra rtl-aware offset to the target
|
|
5646
5646
|
* */
|
|
5647
5647
|
/** */
|
|
@@ -6362,7 +6362,7 @@ var DropList = /*#__PURE__*/function () {
|
|
|
6362
6362
|
}
|
|
6363
6363
|
|
|
6364
6364
|
// Now set the width of the dropdown
|
|
6365
|
-
if (positionOptions.updateWidth) {
|
|
6365
|
+
if (positionOptions.updateWidth || typeof positionOptions.updateWidth === 'number') {
|
|
6366
6366
|
this._updateWidth(positionOptions);
|
|
6367
6367
|
}
|
|
6368
6368
|
|
|
@@ -7720,9 +7720,14 @@ var DropList = /*#__PURE__*/function () {
|
|
|
7720
7720
|
var targetWidth = 0;
|
|
7721
7721
|
|
|
7722
7722
|
if (positionOptions) {
|
|
7723
|
-
|
|
7724
|
-
|
|
7725
|
-
|
|
7723
|
+
if (typeof positionOptions.updateWidth === 'number') {
|
|
7724
|
+
// Set from width specified
|
|
7725
|
+
targetWidth = positionOptions.updateWidth;
|
|
7726
|
+
} else if (positionOptions.targetWidth != null) {
|
|
7727
|
+
// Set from simulated target width
|
|
7728
|
+
targetWidth = positionOptions.updateWidth;
|
|
7729
|
+
} else {
|
|
7730
|
+
// Measure target
|
|
7726
7731
|
targetWidth = Css.getElementWidth(positionOptions.target, true, true);
|
|
7727
7732
|
}
|
|
7728
7733
|
}
|