@danielgindi/selectbox 1.0.141 → 1.0.142

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/lib/SelectBox.js CHANGED
@@ -1936,6 +1936,8 @@ class SelectBox {
1936
1936
  if (!hasGroupSync)
1937
1937
  this._scheduleSync('render_base');
1938
1938
  }
1939
+ } else if (p.multi) {
1940
+ this._scheduleSync('_syncPlaceholder');
1939
1941
  }
1940
1942
 
1941
1943
  this._trigger(checked ? 'addsel' : 'removesel', { value: value, item: item });
@@ -2518,6 +2520,10 @@ class SelectBox {
2518
2520
  this._syncSingleItem();
2519
2521
  break;
2520
2522
 
2523
+ case 'syncPlaceholder':
2524
+ this._syncPlaceholder();
2525
+ break;
2526
+
2521
2527
  case 'removeMultiItemElement': {
2522
2528
  if (p.showSelection) {
2523
2529
  this._syncPlaceholder();
@@ -2741,7 +2747,9 @@ class SelectBox {
2741
2747
  if (typeof p.multiPlaceholderFormatter === 'function') {
2742
2748
  placeholder = p.multiPlaceholderFormatter(p.selectedItems);
2743
2749
  } else {
2744
- placeholder = defaultMultiPlaceholderFormatter(p.selectedItems, p.labelProp);
2750
+ placeholder = p.selectedItems.length === 0
2751
+ ? (p.placeholder || '')
2752
+ : defaultMultiPlaceholderFormatter(p.selectedItems, p.labelProp);
2745
2753
  }
2746
2754
  } else if (p.selectedItems.length === 0 ||
2747
2755
  !p.showSelection ||
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danielgindi/selectbox",
3
- "version": "1.0.141",
3
+ "version": "1.0.142",
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,29 +31,29 @@
31
31
  "homepage": "https://github.com/danielgindi/selectbox#readme",
32
32
  "license": "MIT",
33
33
  "devDependencies": {
34
- "@babel/core": "^7.25.2",
35
- "@babel/preset-env": "^7.25.3",
36
- "@babel/runtime": "^7.25.0",
34
+ "@babel/core": "^7.26.0",
35
+ "@babel/preset-env": "^7.26.0",
36
+ "@babel/runtime": "^7.26.0",
37
37
  "@eslint/eslintrc": "^3.1.0",
38
- "@eslint/js": "^9.8.0",
38
+ "@eslint/js": "^9.14.0",
39
39
  "@rollup/plugin-babel": "^6.0.4",
40
- "@rollup/plugin-commonjs": "^26.0.1",
41
- "@rollup/plugin-node-resolve": "^15.2.3",
40
+ "@rollup/plugin-commonjs": "^28.0.1",
41
+ "@rollup/plugin-node-resolve": "^15.3.0",
42
42
  "@rollup/plugin-terser": "^0.4.4",
43
- "core-js": "^3.38.0",
44
- "eslint": "^9.8.0",
43
+ "core-js": "^3.39.0",
44
+ "eslint": "^9.14.0",
45
45
  "eslint-formatter-codeframe": "^7.32.1",
46
- "eslint-plugin-vue": "^9.27.0",
46
+ "eslint-plugin-vue": "^9.30.0",
47
47
  "fs-extra": "^11.2.0",
48
- "globals": "^15.9.0",
49
- "husky": "^9.1.4",
48
+ "globals": "^15.12.0",
49
+ "husky": "^9.1.6",
50
50
  "pinst": "^3.0.0",
51
- "rollup": "^4.20.0",
52
- "sass": "^1.77.8"
51
+ "rollup": "^4.24.4",
52
+ "sass": "^1.80.6"
53
53
  },
54
54
  "dependencies": {
55
55
  "@danielgindi/dom-utils": "^1.0.8",
56
- "@danielgindi/virtual-list-helper": "^1.0.11",
56
+ "@danielgindi/virtual-list-helper": "^1.0.13",
57
57
  "fast-deep-equal": "^3.1.3",
58
58
  "keycode-js": "^3.1.0",
59
59
  "mitt": "^3.0.1"