svelte-multiselect
Advanced tools
Comparing version 8.2.4 to 8.3.0
@@ -5,2 +5,15 @@ ### Changelog | ||
<!-- auto-changelog-above --> | ||
#### [v8.3.0](https://github.com/janosh/svelte-multiselect/compare/v8.2.4...v8.3.0) | ||
> 25 January 2023 | ||
- Don't error on removing options that are in `selected` but not in `options` array [`#204`](https://github.com/janosh/svelte-multiselect/pull/204) | ||
- Add class 'remove' to buttons that remove selected options [`#202`](https://github.com/janosh/svelte-multiselect/pull/202) | ||
- Add prop allowEmpty: boolean = false [`#198`](https://github.com/janosh/svelte-multiselect/pull/198) | ||
- Support `immutable` Svelte compiler option [`#197`](https://github.com/janosh/svelte-multiselect/pull/197) | ||
- group demo routes [`e813e48`](https://github.com/janosh/svelte-multiselect/commit/e813e480716f29ab4bdd53f90afe56485507fb1c) | ||
- breaking: rename addOptionMsg to createOptionMsg [`f24e025`](https://github.com/janosh/svelte-multiselect/commit/f24e0256fcdc32c90ed798edbb663a6be18ebe00) | ||
#### [v8.2.4](https://github.com/janosh/svelte-multiselect/compare/v8.2.3...v8.2.4) | ||
@@ -21,4 +34,2 @@ | ||
<!-- auto-changelog-above --> | ||
#### [v8.2.3](https://github.com/janosh/svelte-multiselect/compare/v8.2.2...v8.2.3) | ||
@@ -25,0 +36,0 @@ |
@@ -1,2 +0,4 @@ | ||
export { default } from './MultiSelect.svelte'; | ||
export { default as CircleSpinner } from './CircleSpinner.svelte'; | ||
export { default, default as MultiSelect } from './MultiSelect.svelte'; | ||
export { default as Wiggle } from './Wiggle.svelte'; | ||
export type Option = string | number | ObjectOption; | ||
@@ -3,0 +5,0 @@ export type ObjectOption = { |
@@ -1,2 +0,4 @@ | ||
export { default } from './MultiSelect.svelte'; | ||
export { default as CircleSpinner } from './CircleSpinner.svelte'; | ||
export { default, default as MultiSelect } from './MultiSelect.svelte'; | ||
export { default as Wiggle } from './Wiggle.svelte'; | ||
// Firefox lacks support for scrollIntoViewIfNeeded, see | ||
@@ -3,0 +5,0 @@ // https://github.com/janosh/svelte-multiselect/issues/87 |
@@ -7,4 +7,5 @@ import { SvelteComponentTyped } from "svelte"; | ||
activeOption?: Option | null | undefined; | ||
addOptionMsg?: string | undefined; | ||
createOptionMsg?: string | undefined; | ||
allowUserOptions?: boolean | "append" | undefined; | ||
allowEmpty?: boolean | undefined; | ||
autocomplete?: string | undefined; | ||
@@ -11,0 +12,0 @@ autoScroll?: boolean | undefined; |
@@ -8,3 +8,3 @@ { | ||
"license": "MIT", | ||
"version": "8.2.4", | ||
"version": "8.3.0", | ||
"type": "module", | ||
@@ -16,10 +16,10 @@ "svelte": "index.js", | ||
"@playwright/test": "^1.29.2", | ||
"@sveltejs/adapter-static": "1.0.1", | ||
"@sveltejs/kit": "1.0.7", | ||
"@sveltejs/adapter-static": "^1.0.5", | ||
"@sveltejs/kit": "^1.2.2", | ||
"@sveltejs/package": "1.0.2", | ||
"@sveltejs/vite-plugin-svelte": "^2.0.2", | ||
"@typescript-eslint/eslint-plugin": "^5.48.0", | ||
"@typescript-eslint/parser": "^5.48.0", | ||
"@vitest/coverage-c8": "^0.26.3", | ||
"eslint": "^8.31.0", | ||
"@typescript-eslint/eslint-plugin": "^5.48.2", | ||
"@typescript-eslint/parser": "^5.48.2", | ||
"@vitest/coverage-c8": "^0.27.2", | ||
"eslint": "^8.32.0", | ||
"eslint-plugin-svelte3": "^4.0.0", | ||
@@ -31,12 +31,11 @@ "hastscript": "^7.2.0", | ||
"mdsvexamples": "^0.3.3", | ||
"prettier": "^2.8.2", | ||
"prettier": "^2.8.3", | ||
"prettier-plugin-svelte": "^2.9.0", | ||
"rehype-autolink-headings": "^6.1.1", | ||
"rehype-slug": "^5.1.0", | ||
"svelte": "^3.55.0", | ||
"svelte-check": "^3.0.1", | ||
"svelte-github-corner": "^0.2.0", | ||
"svelte-preprocess": "^5.0.0", | ||
"svelte-toc": "^0.5.1", | ||
"svelte-zoo": "^0.1.4", | ||
"svelte": "^3.55.1", | ||
"svelte-check": "^3.0.2", | ||
"svelte-preprocess": "^5.0.1", | ||
"svelte-toc": "^0.5.2", | ||
"svelte-zoo": "^0.2.3", | ||
"svelte2tsx": "^0.6.0", | ||
@@ -46,3 +45,3 @@ "tslib": "^2.4.1", | ||
"vite": "^4.0.4", | ||
"vitest": "^0.26.3" | ||
"vitest": "^0.27.2" | ||
}, | ||
@@ -49,0 +48,0 @@ "keywords": [ |
@@ -45,7 +45,6 @@ <h1 align="center"> | ||
- **6.1.0** The `dispatch` events `focus` and `blur` were renamed to `open` and `close`, respectively. These actions refer to the dropdown list, i.e. `<MultiSelect on:open={(event) => console.log(event)}>` will trigger when the dropdown list opens. The focus and blur events are now regular DOM (not Svelte `dispatch`) events emitted by the `<input>` node. [PR 120](https://github.com/janosh/svelte-multiselect/pull/120). | ||
- **v7.0.0** `selected` (as well `selectedLabels` and `selectedValues`) used to be arrays always. Now, if `maxSelect=1`, they will no longer be a length-1 array but simply a single a option (label/value respectively) or `null` if no option is selected. [PR 123](https://github.com/janosh/svelte-multiselect/pull/123). | ||
- **8.0.0** | ||
- Props `selectedLabels` and `selectedValues` were removed. If you were using them, they were equivalent to assigning `bind:selected` to a local variable and then running `selectedLabels = selected.map(option => option.label)` and `selectedValues = selected.map(option => option.value)` if your options were objects with `label` and `value` keys. If they were simple strings/numbers, there was no point in using `selected{Labels,Values}` anyway. [PR 138](https://github.com/janosh/svelte-multiselect/pull/138) | ||
- Prop `noOptionsMsg` was renamed to `noMatchingOptionsMsg`. [PR 133](https://github.com/janosh/svelte-multiselect/pull/133). | ||
- **v8.3.0** `addOptionMsg` was renamed to `createOptionMsg` (no major since version since it's rarely used) [sha](https://github.com/janosh/svelte-multiselect/commits). | ||
@@ -95,3 +94,3 @@ ## ๐จ   Installation | ||
1. ```ts | ||
addOptionMsg: string = `Create this option...` | ||
createOptionMsg: string = `Create this option...` | ||
``` | ||
@@ -102,2 +101,8 @@ | ||
1. ```ts | ||
allowEmpty: boolean = false | ||
``` | ||
Whether to `console.error` if dropdown list of options is empty. `allowEmpty={false}` will suppress errors. `allowEmpty={true}` will report a console error if component is not `disabled`, not in `loading` state and doesn't `allowUserOptions`. | ||
1. ```ts | ||
allowUserOptions: boolean | 'append' = false | ||
@@ -104,0 +109,0 @@ ``` |
Sorry, the diff of this file is not supported yet
107546
30
304
640