Skip to content

theme attribute does not update dynamically #322

Open
@sissbruecker

Description

@sissbruecker

The theme attribute on Vaadin React components (e.g., Button, TextField, ComboBox) does not update dynamically when the theme prop is changed after the initial render.

Steps to Reproduce:

  • Render a Vaadin React component (e.g., Button) with a theme prop bound to a state variable.
  • Update the state variable that controls the theme prop.
  • Observe that the component's visual theme does not change, the attribute does not update.

Example:

export default function Repro() {
  const [theme, setTheme] = useState('');
  return (
    <>
      <Button theme={theme}>Foo</Button>
      <TextField theme={theme} />
      <ComboBox theme={theme}></ComboBox>
      <input type="checkbox" onChange={(e) => setTheme(e.target.checked ? 'small' : '')} />
    </>
  );
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions