#TS Error - tabindex

7 messages · Page 1 of 1 (latest)

barren wing
#

I'm getting this weird error when using tabindex in a div in a component...

Is this a typing problem with Qwik?

J

#

tabIndex doesn't work either, but wouldn't be correct anyway

hot coyote
#

Just tried it locally. tabIndex works for me, but you have to use a number and not a string

barren wing
#

Yeah, but it should be a string, and it won't accept -1, which has a specific meaning for focus elements

hot coyote
#

It encodes the number into a string when it renders the html, for me at least. tabIndex={-1} works for me, but not tabIndex={"-1"}. I'll look into the types and see if there's something that can be changed. I noticed that textarea only accepts numbers for it's rows and cols properties, so it might be an intentionally typed that way.

barren wing
#

ok great thanks