You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`options`| required prop | Array of strings/numbers or `Option` objects that will be listed in the dropdown. See `src/lib/index.ts` for admissible fields. The `label` is the only mandatory one. It must also be unique. |
94
-
|`activeOption`|`null`| Currently active option, i.e. the one the user currently hovers or navigated to with arrow keys. |
95
-
|`maxSelect`|`null`| Positive integer to limit the number of options users can pick. `null` means no limit. |
96
-
|`maxSelectMsg`|``(current: number, max: number) => `${current}/${max}` ``| Function that returns a string informing the user how many of the maximum allowed options they have currently selected. Return empty string to disable, i.e. `() => ''`. |
97
-
|`selected`|`[]`| Array of currently/pre-selected options when binding/passing as props respectively. |
98
-
|`selectedLabels`|`[]`| Labels of currently selected options. |
99
-
|`selectedValues`|`[]`| Values of currently selected options. |
100
-
|`readonly`|`false`| Disable the component. It will still be rendered but users won't be able to interact with it. |
101
-
|`placeholder`|`undefined`| String shown in the text input when no option is selected. |
102
-
|`input`|`undefined`| Handle to the `<input>` DOM node. |
103
-
|`name`|`undefined`|Passed to the `<input>` for associating HTML form `<label>`s with this component. E.g. clicking a `<label>` with same name will focus this component.|
104
-
|`id`|`undefined`| Applied to the top-level `<div>`e.g. for `document.getElementById()`. |
|`options`| required prop | Array of strings/numbers or `Option` objects that will be listed in the dropdown. See `src/lib/index.ts` for admissible fields. The `label` is the only mandatory one. It must also be unique. |
94
+
|`activeOption`|`null`| Currently active option, i.e. the one the user currently hovers or navigated to with arrow keys. |
95
+
|`maxSelect`|`null`| Positive integer to limit the number of options users can pick. `null` means no limit. |
96
+
|`maxSelectMsg`|``(current: number, max: number) => `${current}/${max}` ``| Function that returns a string informing the user how many of the maximum allowed options they have currently selected. Return empty string to disable, i.e. `() => ''`. |
97
+
|`selected`|`[]`| Array of currently/pre-selected options when binding/passing as props respectively. |
98
+
|`selectedLabels`|`[]`| Labels of currently selected options. |
99
+
|`selectedValues`|`[]`| Values of currently selected options. |
100
+
|`readonly`|`false`| Disable the component. It will still be rendered but users won't be able to interact with it. |
101
+
|`placeholder`|`undefined`| String shown in the text input when no option is selected. |
102
+
|`input`|`undefined`| Handle to the `<input>` DOM node. |
103
+
|`id`|`undefined`|Applied to the `<input>`element for associating HTML form `<label>`s with this component for accessibility. Also, clicking a `<label>` with same `for` attribute as `id`will focus this component. |
104
+
|`name`|`id`| Applied to the `<input>`element. If not provided, will be set to the value of `id`. Sets the key of this field in a submitted form data object. Not useful at the moment since the value is stored in Svelte state, not on the `<input>`.|
105
105
106
106
</div>
107
107
@@ -201,6 +201,8 @@ If you only want to make small adjustments, you can pass the following CSS varia
-`border: var(--sms-focus-border, 1pt solid var(--sms-active-color, cornflowerblue))`: Border when focused. Falls back to `--sms-active-color` if not set which in turn falls back on `cornflowerblue`.
203
203
-`background: var(--sms-readonly-bg, lightgray)`: Background when in readonly state.
204
+
-`div.multiselect.open`:
205
+
-`z-index: var(--sms-open-z-index, 4)`: Useful to ensure the dropdown list of options is displayed on top of other page elements of increased `z-index`.
204
206
-`div.multiselect input`
205
207
-`color: var(--sms-text-color, inherit)`: Input text color.
0 commit comments