Open
Description
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' : '')} />
</>
);
}