svelte-multiselect
Advanced tools
Comparing version 8.0.2 to 8.0.3
@@ -8,3 +8,3 @@ { | ||
"license": "MIT", | ||
"version": "8.0.2", | ||
"version": "8.0.3", | ||
"type": "module", | ||
@@ -18,7 +18,8 @@ "svelte": "index.js", | ||
"@sveltejs/adapter-static": "1.0.0-next.48", | ||
"@sveltejs/kit": "1.0.0-next.538", | ||
"@sveltejs/kit": "1.0.0-next.544", | ||
"@sveltejs/package": "1.0.0-next.5", | ||
"@sveltejs/vite-plugin-svelte": "^1.1.0", | ||
"@sveltejs/vite-plugin-svelte": "^1.1.1", | ||
"@typescript-eslint/eslint-plugin": "^5.42.1", | ||
"@typescript-eslint/parser": "^5.42.1", | ||
"@vitest/coverage-c8": "^0.25.1", | ||
"eslint": "^8.27.0", | ||
@@ -34,3 +35,3 @@ "eslint-plugin-svelte3": "^4.0.0", | ||
"rehype-slug": "^5.1.0", | ||
"svelte": "^3.52.0", | ||
"svelte": "^3.53.1", | ||
"svelte-check": "^2.9.2", | ||
@@ -44,3 +45,3 @@ "svelte-github-corner": "^0.1.0", | ||
"vite": "^3.2.3", | ||
"vitest": "^0.25.0" | ||
"vitest": "^0.25.1" | ||
}, | ||
@@ -47,0 +48,0 @@ "keywords": [ |
@@ -39,10 +39,10 @@ <h1 align="center"> | ||
- **v6.0.0** The prop `showOptions` which controls whether the list of dropdown options is currently open or closed was renamed to `open`. See [PR 103](https://github.com/janosh/svelte-multiselect/pull/103). | ||
- **v6.0.1** The prop `disabledTitle` which sets the title of the `<MultiSelect>` `<input>` node if in `disabled` mode was renamed to `disabledInputTitle`. See [PR 105](https://github.com/janosh/svelte-multiselect/pull/105). | ||
- **v6.0.1** The default margin of `1em 0` on the wrapper `div.multiselect` was removed. Instead, there is now a new CSS variable `--sms-margin`. Set it to `--sms-margin: 1em 0;` to restore the old appearance. See [PR 105](https://github.com/janosh/svelte-multiselect/pull/105). | ||
- **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. See [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. See [PR 123](https://github.com/janosh/svelte-multiselect/pull/123). | ||
- **v6.0.0** The prop `showOptions` which controls whether the list of dropdown options is currently open or closed was renamed to `open`. [PR 103](https://github.com/janosh/svelte-multiselect/pull/103). | ||
- **v6.0.1** The prop `disabledTitle` which sets the title of the `<MultiSelect>` `<input>` node if in `disabled` mode was renamed to `disabledInputTitle`. [PR 105](https://github.com/janosh/svelte-multiselect/pull/105). | ||
- **v6.0.1** The default margin of `1em 0` on the wrapper `div.multiselect` was removed. Instead, there is now a new CSS variable `--sms-margin`. Set it to `--sms-margin: 1em 0;` to restore the old appearance. [PR 105](https://github.com/janosh/svelte-multiselect/pull/105). | ||
- **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. See [PR 138](https://github.com/janosh/svelte-multiselect/pull/138) | ||
- Prop `noOptionsMsg` was renamed to `noMatchingOptionsMsg`. See [PR 133](https://github.com/janosh/svelte-multiselect/pull/133). | ||
- 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). | ||
@@ -102,3 +102,3 @@ ## Installation | ||
Whether users can enter values that are not in the dropdown list. `true` means add user-defined options to the selected list only, `'append'` means add to both options and selected. | ||
If `allowUserOptions` is `true` or `'append'` then the type `object | number | string` of entered value is determined from the first option of the list to keep type homogeneity. | ||
If `allowUserOptions` is `true` or `'append'` then the type `object | number | string` of entered value is determined by `typeof options[0]` (i.e. the first option in the dropdown list) to keep type homogeneity. | ||
@@ -415,3 +415,3 @@ 1. ```ts | ||
This component also forwards many DOM events from the `<input>` node: `blur`, `change`, `click`, `keydown`, `keyup`, `mousedown`, `mouseenter`, `mouseleave`, `touchcancel`, `touchend`, `touchmove`, `touchstart`. You can register listeners for these just like for the above [Svelte `dispatch` events](https://svelte.dev/tutorial/component-events): | ||
The above list of events are [Svelte `dispatch` events](https://svelte.dev/tutorial/component-events). This component also forwards many DOM events from the `<input>` node: `blur`, `change`, `click`, `keydown`, `keyup`, `mousedown`, `mouseenter`, `mouseleave`, `touchcancel`, `touchend`, `touchmove`, `touchstart`. Registering listeners for these events works the same: | ||
@@ -470,3 +470,3 @@ ```svelte | ||
- `color: var(--sms-text-color)` | ||
- `min-height: var(--sms-min-height, 19pt)` | ||
- `min-height: var(--sms-min-height, 22pt)` | ||
- `width: var(--sms-width)` | ||
@@ -473,0 +473,0 @@ - `max-width: var(--sms-max-width)` |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
66603
29