Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upfix(select): disable focus trap on checkbox select with no children #2647
Conversation
Signed-off-by: Boaz Shuster <boaz.shuster.github@gmail.com>
This comment has been minimized.
This comment has been minimized.
PatternFly-React preview: https://patternfly-react-pr-2647.surge.sh |
This comment has been minimized.
This comment has been minimized.
Hi @boaz0, your changes look great! When I set the select dropdown to have no children (delete the I'm wondering what should be the default behavior of the select dropdown if there are no children. Though it's also possible that I'm not testing it like you did... how did you test your changes? |
This comment has been minimized.
This comment has been minimized.
Hi @jenny-s51, I would say that issue is out of scope for this PR. The behavior exists on all select components so it's probably better suited for patternfly-next |
This comment has been minimized.
This comment has been minimized.
@SpyTec Makes sense to me -- thank you for clarifying Eric! |
LGTM |
This comment has been minimized.
This comment has been minimized.
@jenny-s51 sorry for the late response. I actually thought an empty div is an expected behavior. Though, I agree with @SpyTec when he said we should ask the pf4 core team what they think about it. //cc @mcoker @mcarrano - can you take a look at this. What should the expanded select item look like when there are no children/options? |
This comment has been minimized.
This comment has been minimized.
Can you give me an example use case of how/where this would show up? |
This comment has been minimized.
This comment has been minimized.
Yes @mcarrano please see patternfly/patternfly-next#2132 (comment) for @SpyTec 's response to your question |
This comment has been minimized.
This comment has been minimized.
mceledonia
commented
Aug 7, 2019
•
|
This comment has been minimized.
This comment has been minimized.
This fixes an bug that is already present (throws an exception if no children present), merging this and in the meantime we can explore a loading pattern/skeleton for when there are no children in patternfly/patternfly-next#2132 |
boaz0 commentedAug 5, 2019
What:
It seems like Focus Trap throws exception if no children to ref. In order to avoid this error, render the component with no Focus Trap when no children is passed.
closes #2618
//cc @SpyTec