Skip to content

Commit b0170ff

Browse files
fix(Dropdown): update typings for defaultValue & value (#4018)
* Fixed typing for defaultValue and value Allow arrays of strings, numbers, and booleans instead of just boolean[] * Fixed comment Co-authored-by: Oleksandr Fediashov <[email protected]>
1 parent fc2fd4c commit b0170ff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/modules/Dropdown/Dropdown.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export interface StrictDropdownProps {
7474
defaultUpward?: boolean
7575

7676
/** Initial value or value array if multiple. */
77-
defaultValue?: string | number | boolean | number | string | boolean[]
77+
defaultValue?: string | number | boolean | (number | string | boolean)[]
7878

7979
/** A dropdown menu can open to the left or to the right. */
8080
direction?: 'left' | 'right'
@@ -279,7 +279,7 @@ export interface StrictDropdownProps {
279279
trigger?: React.ReactNode
280280

281281
/** Current value or value array if multiple. Creates a controlled component. */
282-
value?: boolean | number | string | boolean | number | string[]
282+
value?: boolean | number | string | (boolean | number | string)[]
283283

284284
/** Controls whether the dropdown will open upward. */
285285
upward?: boolean

0 commit comments

Comments
 (0)