-
Notifications
You must be signed in to change notification settings - Fork 49.9k
Description
Do you want to request a feature or report a bug?
Report a possible bug.
What is the current behavior?
Most of my custom element's attributes render, but the size attribute does not. It appears to be stripped out by React.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:
I am testing a Web Component integration with React. Given a collection of possible attributes and values to test, I map through them and create multiple buttons,
[
...
{
href: 'https://google.com/',
text: 'Link',
id: 'c'
},
{
size: 'jumbo',
text: 'Jumbo',
id: 'd'
},
...
]<dls-button key={id} href={href} label={label} size={size} theme={theme} type={type} width={width}>{text}</dls-button>The href, label, theme, type, and width attributes are rendered when they have a value, as expected. However, the size attribute is missing.
What is the expected behavior?
The size attribute and its value should be rendered.
Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
react@16.3.2
Google Chrome 66.0.3359.139
All of this custom element's attributes function as expected when integrated with Angular or in a vanilla setup, but not with React.