-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: allow filterProps to be a function #417
Conversation
Thanks for rebasing this PR 👍 I will have a look into it in the next days |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this change ! Good idea to use a function here, it's a lot more powerful for the users 😃
Before we can merge we should also edit the Options
flow definitions to allow add the functional version of the filterProps
option:
filterProps: string[], |
Let's get this merged! I was looking for a way to filter props with value of |
Let's do this! 🚀 |
Released in v14.3.0 |
I see this is still relatively fresh!! Ideally, I could write a function that replaces that prop value with the component's displayName. Similar to how options.displayName works... but for property values. In the above example, I would like to pass the following to filterProps: |
filterProps can now be passed as either an array of strings, or a function that will be called with the props value and key and return false to filter out that prop.
Closes #286