Skip to content

Commit cd7ee11

Browse files
authored
docs: add more options to list of new features
1 parent d1b8373 commit cd7ee11

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

README.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,13 @@ npm install multiple-select-vanilla
4545
New Multiple-Select Options:
4646
- dropped jQuery requirement and replaced necessary code with browser native code.
4747
- rewritten in TypeScript to also add typings support (`d.ts`)
48-
- revamped the UI to give it a more Modern Look by updating the CSS and using SVG icons (CSS/SASS variables are also availables)
49-
- add extra features:
48+
- make the lib CSP compliant (see section below)
49+
- revamped the UI to give it a more Modern Look:
50+
- improve CSS styling and use SVG icons (CSS/SASS variables are also availables)
51+
- new Dark Mode
52+
- replace tabIndex by a more intuitive navigation & highlight by using arrow keys (or mouse hover)
53+
- show 3 different states on multiple selections (none " ", partial "-", all "🗸")
54+
- add extra options:
5055
- `autoAdjustDropHeight` will automatically adjust the drop (up/down) height by available space (see [demo](https://ghiscoding.github.io/multiple-select-vanilla/#/options30))
5156
- `autoAdjustDropPosition` will find best position (top/bottom) by its available space (see [demo](https://ghiscoding.github.io/multiple-select-vanilla/#/options29))
5257
- `autoAdjustDropWidthByTextSize` automatically set the drop width size from the widest list option width
@@ -59,11 +64,13 @@ New Multiple-Select Options:
5964
- `showOkButton` to add an "OK" button at the end of the multiple select option list (see [demo](https://ghiscoding.github.io/multiple-select-vanilla/#/options25))
6065
- `showSearchClear` show a clear button on the search filter input (see [demo](https://ghiscoding.github.io/multiple-select-vanilla/#/options34))
6166
- `diacriticParser` custom parser to normalize diacritic signs when filtering select list (see [demo](https://ghiscoding.github.io/multiple-select-vanilla/#/options35))
62-
- replace tabIndex by a more intuitive navigation & highlight by using arrow keys (or mouse hover)
6367
- `darkMode` option for a new **Dark Mode** Theme (see [demo](https://ghiscoding.github.io/multiple-select-vanilla/#/options38))
68+
- `infiniteScroll` option (see [demo](https://ghiscoding.github.io/multiple-select-vanilla/#/options36))
69+
- `onFilterClear` callback that will be executed when the filter gets cleared (see [demo](https://ghiscoding.github.io/multiple-select-vanilla/#/events))
70+
- `onClose(reason)` callback that will be executed when the dropdown closes (see [demo](https://ghiscoding.github.io/multiple-select-vanilla/#/events))
6471

6572
## CSP Compliance
66-
The library is now CSP (Content Security Policy) compliant, however there are some exceptions to be aware of. When using any HTML strings as template (when using `textTemplate`, `labelTemplate`, `renderOptionLabelAsHtml` or `useSelectOptionLabelToHtml`), you will not be fully compliant unless you return [`TrustedHTML`](https://developer.mozilla.org/en-US/docs/Web/API/TrustedHTML). You can achieve safety by using the `sanitizer` method in combo with an external library like [DOMPurify](https://github.com/cure53/DOMPurify) to return `TrustedHTML` as shown below and with that in place you will be CSP compliant.
73+
The library is now CSP (Content Security Policy) compliant, however there are some exceptions to be aware of. When using any HTML strings as template (when using `textTemplate`, `labelTemplate`, `renderOptionLabelAsHtml` or `useSelectOptionLabelToHtml`), you will not be fully compliant unless you return [`TrustedHTML`](https://developer.mozilla.org/en-US/docs/Web/API/TrustedHTML). You can achieve this by using the `sanitizer` method in combo with an external library like [DOMPurify](https://github.com/cure53/DOMPurify) (recommended) to return `TrustedHTML` as shown below and with that in place you will be CSP compliant.
6774

6875
```typescript
6976
import DOMPurify from 'dompurify';

0 commit comments

Comments
 (0)