filtered-select-multiple-widget 0.0.5 → 0.0.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.
package/README.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Filtered Select Multiple Widget
2
2
 
3
+ [![npm version](https://img.shields.io/npm/v/filtered-select-multiple-widget)](https://www.npmjs.com/package/filtered-select-multiple-widget)
4
+ [![license](https://img.shields.io/npm/l/filtered-select-multiple-widget)](https://github.com/tombreit/filtered-select-multiple-widget/blob/main/LICENSE)
5
+ [![Publish](https://github.com/tombreit/filtered-select-multiple-widget/actions/workflows/publish.yml/badge.svg)](https://github.com/tombreit/filtered-select-multiple-widget/actions/workflows/publish.yml)
6
+ [![Deploy](https://github.com/tombreit/filtered-select-multiple-widget/actions/workflows/deploy.yml/badge.svg)](https://github.com/tombreit/filtered-select-multiple-widget/actions/workflows/deploy.yml)
7
+
3
8
  A dependency-free, JavaScript implementation of Django's dual-pane “FilteredSelectMultiple” widget. It transforms a native `<select multiple>` element into a picker with move buttons and client-side filtering.
4
9
 
5
10
  ![Screenshot Filtered Select Multiple Widget](./docs/filtered-select-multiple-widget-screenshot.png)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "filtered-select-multiple-widget",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "description": "ES module implementation of Django's FilteredSelectMultiple widget.",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -47,7 +47,7 @@
47
47
  },
48
48
  "scripts": {
49
49
  "test": "node --check src/index.js && node --check src/FilteredSelectMultiple.js && node --check src/themes.js && node --check src/icons.js",
50
- "predemo": "ln -sf ../src docs/src",
50
+ "predemo": "ln -sfn ../src docs/src",
51
51
  "demo": "http-server docs/ -p 8000 -o",
52
52
  "preghpages": "rm -rf docs/src",
53
53
  "ghpages": "cp -r src docs/src"
@@ -436,7 +436,10 @@ export class FilteredSelectMultiple {
436
436
  option.textContent = meta.label;
437
437
  option.dataset.key = key;
438
438
  option.disabled = meta.disabled;
439
- if (meta.title) option.title = meta.title;
439
+ // Always give every option a tooltip so long labels remain readable
440
+ // when a width-constrained parent truncates the visible text. Prefer an
441
+ // explicit title from the source markup, otherwise fall back to the label.
442
+ option.title = meta.title || meta.label;
440
443
  Object.entries(meta.dataset).forEach(([attr, value]) => {
441
444
  option.dataset[attr] = value;
442
445
  });