In the following example, if I don't do ?. for the event.target.value, typescript has the error Object is possibly null. With the ?. I get the error Property 'value' does not exist on type 'EventTarget'.
What do I need to do to get the type of the event for the onchange to be correct?
import { createSignal } from "solid-js";
export default function Cards() {
const [cellsWide, setCellsWide] = createSignal(0);
return (
<>
<div>
<select
name="cellsWide"
onChange={(e: Event) => {
console.log(e?.target?.value);
}}
>
<option value="5">5</option>
<option value="3">3</option>
</select>
</div>
<div>This is where cards goes - {cellsWide()}</div>
</>
);