v2.3.3 data-* attributes lost
See original GitHub issueVersion
styled-components: 2.3.3
Reproduction
As of version 2.3.3 Styled components are stripping out data-*
attributes and not passing them on or respecting them in the rendering. Rolling back to 2.3.1 seems to still keep the desired behavior. These attributes should also continue to be passed on to any components that are extended by styled-components.
Steps to reproduce
const Node = styled.div` background-color: red;`
export default Component = () => <Node data-value="it works">Test</Node>
Expected Behavior
Html output
<div class="auto-generated" data-value="it works">Test</div>
Actual Behavior
Html output
<div class="auto-generated">Test</div>
Issue Analytics
- State:
- Created 6 years ago
- Comments:12 (7 by maintainers)
Top Results From Across the Web
3.2 Elements — HTML5 - W3C
The attribute has no invalid value default and no missing value default. The directionality of the element is 'ltr'. The directionality of the...
Read more >Transfer Attribute doesn't work for nearest instance ...
This is a known bug (missing feature) in Blender versions lower than 3.4, which is now considered solved. The current solution for 3.4...
Read more >3.3 COUNTER Report Common Attributes and Elements
3.3.2 Data Types¶. R5 reports on scholarly information in many ways. These major groupings, referred to as Data_Types, are listed in the table...
Read more >3.3.2 Procedure 2: SETATTR - Set file attributes - Freesoft
Changing the size of a file with SETATTR indirectly changes the mtime. A client must account for this as size changes can result...
Read more >3. Data model — Python 3.11.1 documentation
The pathname of the file from which the module was loaded, if it was loaded from a file. The __file__ attribute may be...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’ll double check, and post a more complete example. Thanks for the snappy response @mxstbr
It should still be data-index. React doesn’t camelCase data and aria attributes. On Tue, May 22, 2018 at 5:25 AM George James notifications@github.com wrote: