Provide an option to disable props filtering
See original GitHub issueDescribe the enhancement
Provide an option to disable props filtering.
Motivation
Now, there is a filter for props:
https://github.com/callstack/linaria/blob/master/packages/react/src/styled.ts#L111-L120
But the conditions for checking whether an element is HTML tag or custom element are not satisfy with our cases.
We have some element with names like: View、Text、Input from WeChat MiniApp,and both of them have some special attributes like: hoverClass.Once linaria filter these attributes, then it will not work correctly.
Possible implementations
// Check if it's an HTML tag and not a custom element
if (options.enablePropsFilter && typeof component === 'string' && component.indexOf('-') === -1) {
// ...
} else {
filteredProps = rest;
}
Issue Analytics
- State:
- Created a year ago
- Comments:5
Top Results From Across the Web
React Select disable options - Stack Overflow
use isOptionDisabled props of react-select component to filter options based on 'disabled' property. Here's an example:
Read more >React interactivity: Editing, filtering, conditional rendering
Add an onClick handler that calls props.setFilter() with the filter's name. With all of that done, your FilterButton() function should read like ...
Read more >React-admin - Filtering the List
React-admin uses the filter query parameter from the URL to determine the filters to apply to the list. To change the filters, react-admin...
Read more >Column Filter Props · react-bootstrap-table2
Give filter prop on BootstrapTable which value is the return value from calling filterFactory function; Add filter property on column object:.
Read more >Data Grid - Filtering - MUI X
Filters are enabled by default, but you can easily disable this feature by setting the disableColumnFilter prop. <DataGrid disableColumnFilter />
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

Ok, I have an idea, but I need some time to implement it.
@Chen-jj Unfortunately, it seems like there is no way to detect whether or not passed argument is a default tag or a custom component. According to the specs, names of custom components must have a hyphen, so
Viewand especiallyvieware just wrong names and we cannot support them.