You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to contribute to https://github.com/esphome/dashboard and learn typescript and lit doing that.
Right now I'm trying to add lit-analyzer package to repo and fix all errors is thows.
One of the errors I noticed is:
that is the empty value of the scrimClickAction attribute.
After looking at the definition of mwc-dialog I can see this:
Lit's fromAttribute convertor has no case for string, so it treats strings just as they get it from the HTML DOM object. An empty attribute is returned as an empty string. That is implicit. It's a bug in lit analyzer that it does not accept an empty attribute for a string value. It's not that it didn't extract the type correctly.
According to the docs (https://github.com/material-components/material-web/tree/mwc/packages/dialog#propertiesattributes) setting an empty value will prevent closing the dialog, this is the behavior I want, so setting an empty attribute without an empty value should be fine.
The project I mentioned (esphome/dashboard) works perfectly with empty values for scrimClickAction, so I'd like to know if this is a correct error or a bug in lit-analyzer?
The text was updated successfully, but these errors were encountered:
I'm trying to contribute to https://github.com/esphome/dashboard and learn typescript and lit doing that.
Right now I'm trying to add lit-analyzer package to repo and fix all errors is thows.
One of the errors I noticed is:
that is the empty value of the
scrimClickAction
attribute.After looking at the definition of
mwc-dialog
I can see this:the
scrimClickAction
attribute has a string as a type, but as suggested here:According to the docs (https://github.com/material-components/material-web/tree/mwc/packages/dialog#propertiesattributes) setting an empty value will prevent closing the dialog, this is the behavior I want, so setting an empty attribute without an empty value should be fine.
The project I mentioned (esphome/dashboard) works perfectly with empty values for
scrimClickAction
, so I'd like to know if this is a correct error or a bug in lit-analyzer?The text was updated successfully, but these errors were encountered: