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
Currently, the value property of a MultiSelect object is defined as a (string|number)[]. However, SelectOptionType<any> allows the selected values to be complex objects. I am wrapping MultiSelect with a generic component, and I get an error trying to bind value to a T[]. Note that Select.value is of type any, so the binding there isn't problematic.
Note that this error isn't a showstopper, since it doesn't actually cause a build error; it just looks ugly in the IDE.
From Rider:
Types of property value are incompatible.
Type T[] is not assignable to type (string | number)[]
Type T is not assignable to type string | number
The lib\Test component uses the MultiSelect component with a T[]. Everything works, but Rider and VS Code both show a TypeScript error because T[] and (string|number)[] are not compatible.
Describe the bug
Currently, the
value
property of aMultiSelect
object is defined as a(string|number)[]
. However,SelectOptionType<any>
allows the selected values to be complex objects. I am wrappingMultiSelect
with a generic component, and I get an error trying to bindvalue
to aT[]
. Note thatSelect.value
is of typeany
, so the binding there isn't problematic.Note that this error isn't a showstopper, since it doesn't actually cause a build error; it just looks ugly in the IDE.
From Rider:
Types of property value are incompatible.
Type T[] is not assignable to type (string | number)[]
Type T is not assignable to type string | number
Reproduction
https://github.com/ttrias/flowbite-svelte-issue-template
The
lib\Test
component uses theMultiSelect
component with aT[]
. Everything works, but Rider and VS Code both show a TypeScript error becauseT[]
and(string|number)[]
are not compatible.Flowbite version and System Info
The text was updated successfully, but these errors were encountered: