Shmew/Feliz.MaterialUI

Where is the checked propery for radio?

Closed this issue · 16 comments

forki commented

image

I can find a prop.isChecked, but that one is invalid

It's called checked'. Don't you get intellisense for it?

Shmew commented

I think that's because he was looking for it in prop and not radio, and the property is radio.checked'

Oh, right. Feliz.MaterialUI doesn't define anything in prop, that's from Feliz.

From prop , it is called prop.isChecked

From prop , it is called prop.isChecked

That's a different prop. The MUI Radio component has its own checked prop.

forki commented

You lost me.

There is no "checked". could you please try to write a demo. This would also help further generations

Like this:

image

It's no different from any other MUI prop. Are you really not seeing it in your IDE?

image

forki commented
forki commented

image

seems something is still wrong

That's a different issue. How are you using radio.checked'?

forki commented

image

Hmm, weird. The code is literally a simple as this, I can't see anything wrong on Feliz.MaterialUI's end here:

image

My guess is the problem lies elsewhere, but I don't know where. Which versions of Feliz.MaterialUI and @material-ui/core are you using?

forki commented
Feliz.MaterialUI (0.13.1)
"@material-ui/core@^4.9.2"

inside of electron

Can you try replacing

radio.checked' config.SyncImagesOnlyWithWifi

with

prop.custom("checked", config.SyncImagesOnlyWithWifi)

If that also fails, the error is not in Feliz.MaterialUI.

forki commented

ok I'm offically confused now.

As you expected prop.custom("checked", config.SyncImagesOnlyWithWifi) did not make it work, BUT prop.custom("checked", config.SyncImagesOnlyWithWifi = true) did. So some additional check making it super explicitid that this a bool made it work. Is this a problem with some js prop types lib!? //cc @ncave

forki commented

Ok I found the reason. For some reason Sqlite is giving me 1 instead of a true. It never really is a problem because of js truthiness. But here it is. Anyway will try to work around that