Flow: Regression: `hidden` attribute is set to false when server instantiates the component

Created on 16 Jan 2018  路  3Comments  路  Source: vaadin/flow

Having this code, the button is finally shown (hidden attribute is removed)

<vaadin-button id="foo" hidden>Foo</vaadin-button>

@Id("foo")
private Button foo;

bug investigation

Most helpful comment

I know the reason. Let it be assigned to me to avoid wasting time from someone who doesn't familiar with the situation.

All 3 comments

a short investigation with platform 10.0.0.alpha14.

the hidden attribute can be only set via using button.setVisible(true/false) api, but if we set the attribute from the template file with <vaadin-button id="foo" hidden>Foo</vaadin-button> or <vaadin-button id="foo" hidden="true">Foo</vaadin-button>, the attribute will be removed, when server instantiates the component.

for setting other attribute from template file, it works as expected. (tested with disabled).

Why does it remove the attribute when the server instantiates the component?
That's the question.

I know the reason. Let it be assigned to me to avoid wasting time from someone who doesn't familiar with the situation.

Was this page helpful?
0 / 5 - 0 ratings