@danielgindi/selectbox 1.0.101 → 1.0.103
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 +265 -31
- 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 +15 -2
- 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 +265 -31
- 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 +2 -1
- package/lib/SelectBox.js +12 -0
- package/package.json +9 -9
package/lib/DropList.js
CHANGED
|
@@ -1371,9 +1371,10 @@ class DropList {
|
|
|
1371
1371
|
const el = p.el, scrollTop = el.scrollTop;
|
|
1372
1372
|
|
|
1373
1373
|
let itemPos, previousPos = -1;
|
|
1374
|
+
let maxIterations = 30; // Some zoom/scroll issues can make it so that it takes almost forever
|
|
1374
1375
|
|
|
1375
1376
|
// eslint-disable-next-line no-constant-condition
|
|
1376
|
-
while (
|
|
1377
|
+
while (maxIterations-- > 0) {
|
|
1377
1378
|
itemPos = p.virtualListHelper.getItemPosition(itemIndex);
|
|
1378
1379
|
|
|
1379
1380
|
if (itemPos === previousPos)
|
package/lib/SelectBox.js
CHANGED
|
@@ -357,7 +357,19 @@ class SelectBox {
|
|
|
357
357
|
|
|
358
358
|
if (window.ResizeObserver !== undefined) {
|
|
359
359
|
p.resizeObserver = new ResizeObserver(() => {
|
|
360
|
+
p.resizeObserver.unobserve(p.el); // avoid ResizeObserver infinite loop
|
|
361
|
+
|
|
362
|
+
if (this[DestroyedSymbol])
|
|
363
|
+
return;
|
|
364
|
+
|
|
360
365
|
this._resizeInput();
|
|
366
|
+
|
|
367
|
+
// avoid ResizeObserver infinite loop - only renew the observation after the new layout has settled
|
|
368
|
+
requestAnimationFrame(() => {
|
|
369
|
+
if (this[DestroyedSymbol])
|
|
370
|
+
return;
|
|
371
|
+
p.resizeObserver.observe(p.el);
|
|
372
|
+
});
|
|
361
373
|
});
|
|
362
374
|
p.resizeObserver.observe(p.el);
|
|
363
375
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@danielgindi/selectbox",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.103",
|
|
4
4
|
"description": "A collection of dom utilities. So you can work natively with the dom without dom frameworks.",
|
|
5
5
|
"main": "dist/lib.cjs.min.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -31,22 +31,22 @@
|
|
|
31
31
|
"homepage": "https://github.com/danielgindi/selectbox#readme",
|
|
32
32
|
"license": "MIT",
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@babel/core": "^7.
|
|
34
|
+
"@babel/core": "^7.21.3",
|
|
35
35
|
"@babel/preset-env": "^7.20.2",
|
|
36
|
-
"@babel/runtime": "^7.
|
|
36
|
+
"@babel/runtime": "^7.21.0",
|
|
37
37
|
"@rollup/plugin-babel": "^6.0.3",
|
|
38
38
|
"@rollup/plugin-commonjs": "^24.0.1",
|
|
39
39
|
"@rollup/plugin-node-resolve": "^15.0.1",
|
|
40
40
|
"@rollup/plugin-terser": "^0.4.0",
|
|
41
|
-
"core-js": "^3.
|
|
42
|
-
"eslint": "^8.
|
|
41
|
+
"core-js": "^3.29.1",
|
|
42
|
+
"eslint": "^8.36.0",
|
|
43
43
|
"eslint-formatter-codeframe": "^7.32.1",
|
|
44
|
-
"eslint-plugin-vue": "^9.
|
|
45
|
-
"fs-extra": "^11.1.
|
|
44
|
+
"eslint-plugin-vue": "^9.10.0",
|
|
45
|
+
"fs-extra": "^11.1.1",
|
|
46
46
|
"husky": "^8.0.3",
|
|
47
47
|
"pinst": "^3.0.0",
|
|
48
|
-
"rollup": "^3.
|
|
49
|
-
"sass": "^1.
|
|
48
|
+
"rollup": "^3.20.2",
|
|
49
|
+
"sass": "^1.60.0"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"@danielgindi/dom-utils": "^1.0.8",
|