Closed sodapopcan closed 3 weeks ago
hey there 👋
this is weird, as this shorthand boolean rendering does seem to work properly here and is thoroughly tested in this file
Are your attributes properly declared as boolean before your function component? https://hexdocs.pm/phoenix_live_view/Phoenix.Component.html#module-attributes
I will have a look at nil attributes, I'm not sure this is properly handled
Ohhhhhh I see, it only works on declared attributes.
Yes, I was seeing it with globals mainly on <.input disabled>
. I tried it like this:
attr :rest, :global, include: ~w[disabled]
but it still does not pick it up.
I'm happy to take a look myself, though it'll be a week or so before I can.
Thanks!
Hey @sodapopcan, did you get a chance to take a look?
Sorry, no I have not as I have a bunch on my list and this is a "nice to have." I'm still planning on a PR, though.
sure, feel free to reopen whenever you want
Hey Christian!
Thanks so much for Storybook, it's very awesome.
Related to this #169, this appears not to be working anymore. I'm seeing
attr={true}
in all my components. Furthermore, would it be possible to ignore any attributes that arenil
as this is how HEEx works (passingnil
to an attribute will not render the whole attribute). I was looking for a setting for this but can't seem to find it.Thanks again, Andrew