Closed dpere326 closed 1 year ago
I think this looks like a bug in Material UI, but it's the thing which can easily go unnoticed in Javascript since it won't throw an exception.
.target.value
for an input or text area field should be a string, but here it is a number
.
To unblock yourself you can say something like val rpp = reducedEvent.target.asInstanceOf[js.Dynamic].selectDynamic("value").asInstanceOf[Double]
Thanks for the quick feedback! The suggested workaround worked like a charm 👍
reducedEvent.target.asInstanceOf[js.Dynamic].selectDynamic("value").asInstanceOf[Double]
No need for selectDynamic("value")
, the whole point of Dynamic is that you can just do .value
So reducedEvent.target.asInstanceOf[js.Dynamic].value.asInstanceOf[Double]
should work.
I'm having difficulties extracting value from events. Any attempt results in a
java.lang.ClassCastException
where the value can't be cast to StringFor example, handling
TablePagination
onRowsPerPageChange
and accessing the correspondingevent.target.value
results in this issue.Please kindly advise if I'm missing something in the process.
Thanks!