Skip to content
This repository was archived by the owner on Sep 26, 2022. It is now read-only.

Commit 8cf5175

Browse files
committed
fix(types/select.d.ts): Value can be single value or array
When `multiple` prop is false, the value of a `<Select />` is a single value. Updated .d.ts to reflect this.
1 parent 8142883 commit 8cf5175

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/svelte-materialify/@types/Select.d.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@ interface SelectProps {
55
class?: string;
66
/** Whether select is opened. */
77
active?: boolean;
8-
/** Value of the select. */
9-
value?: number[] | string[];
8+
/**
9+
* Value of the select.
10+
* If multiple is true, this will be an array; otherwise a single value.
11+
*/
12+
value?: (number[] | string[]) | number | string;
1013
/** List of items to select from. */
1114
items?: { name: string | number, value: string | number }[];
1215
/** Whether select is the `filled` material design variant. */

0 commit comments

Comments
 (0)