Open Legioth opened 1 week ago
Caused by the following logic in the observer:
I think I noticed a similar effect with some other attributes also such as title
on <vaadin-chart-series>
.
And then there's no-legend
which seems to work as expected when updating the attribute but HRM has no effect at least with React when adding or removing that prop.
Description
The chart does not go back to the default value when an attribute such as
type
is removed. This is maybe not something that is common in application code but it immediately becomes apparent when the update is triggered through HMR after editing application code to no longer use the attribute.Expected outcome
Expected that removing an attribute makes the chart render in the same way as before the attribute was added
Minimal reproducible example
https://vaadin.com/docs/latest/components/charts/charttypes#line-example
Steps to reproduce
<vaadin-chart>
element corresponding to the "Line example" charttype="column"
attribute to the element. Notice that chart becomes a column chart instead of a line chart.type
attribute to revert the element to its original configuration. Notice that this still renders a column chart rather than a line chart.Environment
Vaadin version(s): Tested with Vaadin 24.5.0.alpha13 and whatever version is currently used by the documentation.
Browsers
Issue is not browser related