I just opened an issue for a kotlin wrappers issue...
# react
m
I just opened an issue for a kotlin wrappers issue here. Related question: What’s the intended way to use the
onChange
function for MUI components now? Previously, with the
value
parameter being
dynamic
it was pretty straight forward because we just did
onChange = { _, value: String?, _, _ -> … }
. Now, with
value
being refactored from
dynamic
to
Any
or
Any?
depending on the component, I need to do an unsafe cast inside the function like
value as String?
. Is this really the intended way?
t
Probably value must be
T?
?
m
I took a look at the signature again and it turns out the fourth parameter
details: AutocompleteChangeDetails<Value>?
contains the value
T
. But imo
value
should be
T?
and not
Any
🤔 (See next message)
Also, one issue remains when using the
details
parameter because of the type system: When
multiple = true
, we still get
T
when it should be
Array<T>
.
t
That is why it's
Any (T | Array<T>)
👍🏼 1
Probably we will move this type in common place to support such cases
👍🏼 1