-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Shadow Appears on Disabled, Selected Flat Chip When Rendered Next to Outlined Chip in Same Row #4457
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
Comments
After playing around some more, the issue seems to lie in the |
Thanks for taking a deeper look into this issue! Apologies for the confusion around this. Our setup is such that a we switch between |
I got you! I gave it another go and toggled between flat and outlined modes, but I couldn't reproduce the issue. Check out this Expo snack to see how I tested it: Expo Snack Link. I also ran it locally with the same versions of react-native and react-native-paper. If there's anything I should tweak in my code to trigger the issue, just let me know! |
The fix from mentioned PR was released in |
Current behaviour
I'm rendering chip 1, an outlined chip that is not selected and not disabled in the same row as chip 2, a flat chip that is selected and disabled. Chip 2 is showing a shade at the bottom of the element.

The issue seems to only arise when putting chips 1 and 2 in the same row, stacking vertically results in the expected rendering:

Expected behaviour
Chip 1: outlined, not selected, not disabled
Chip 2: flat, selected, disabled
Putting Chip 1 and Chip 2 in the same row gives two chips of the same height, where Chip 2 does not have a shade at the bottom.
How to reproduce?
Preview
What have you tried so far?
Explicitly setting the height of the chips to 32 solves the problem. I suspect a problem with two different overlays (disabled and selected) with different flex properties.
Edit: The above proposed fix still causes problems with chips that have an onClose handler, as the cross icon increases the size of the chip.
Your Environment
The text was updated successfully, but these errors were encountered: