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 +5 -0
- package/package.json +2 -2
- package/src/FilteredSelectMultiple.js +4 -1
package/README.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Filtered Select Multiple Widget
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/filtered-select-multiple-widget)
|
|
4
|
+
[](https://github.com/tombreit/filtered-select-multiple-widget/blob/main/LICENSE)
|
|
5
|
+
[](https://github.com/tombreit/filtered-select-multiple-widget/actions/workflows/publish.yml)
|
|
6
|
+
[](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
|

|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "filtered-select-multiple-widget",
|
|
3
|
-
"version": "0.0.
|
|
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 -
|
|
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
|
-
|
|
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
|
});
|