Skip to content

Have boolean properties set/remove attributes #1

@asyncliz

Description

@asyncliz

I think boolean properties should behave like boolean attributes. If the value is true, the attribute exists, and does not exist if the value is false.

Right now, boolean props will set prop="false" or prop="true", which isn't usually the use case for webcomponents.

const VaadinButton = adapt('vaadin-button');

let isDisabled = false;
ReactDOM.render(
  <VaadinButton disabled={isDisabled} />, 
  document.querySelector('#root')
);

The above renders a disabled button:

<vaadin-button disabled="false"></vaadin-button>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions