-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
[collapsible][accordion] Add keepMounted
prop
#807
base: master
Are you sure you want to change the base?
Conversation
Netlify deploy preview |
33cd50b
to
4778c4a
Compare
@colmtuite @vladmoroz Do you think it's an issue that 2 props are required to use hidden-until-found now? <Collapsible.Panel hiddenUntilFound keepMounted>
{/* content */}
</Collapsible.Panel> |
@mj12albert I think we should always mount the panel when |
If |
f57a122
to
11b782d
Compare
11b782d
to
f3362c7
Compare
f9f677f
to
06c64f4
Compare
// toWarnDev doesn't work reliably with async rendering. To re-enable after it's fixed in the test-utils. | ||
// eslint-disable-next-line mocha/no-skipped-tests | ||
it.skip('warns when setting both `hiddenUntilFound` and `keepMounted={false}`', async function test() { |
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.
I tested this warning manually 😓
Updated ~ would appreciate a review @vladmoroz @michaldudak 🙏 |
277543f
to
42077e9
Compare
307c354
to
a07722b
Compare
a07722b
to
28adc8a
Compare
Closes #728
We decided to default
keepMounted
tofalse
for consistency with other components.Since
hiddenUntilFound
requireskeepMounted={true}
to work, using it will overridekeepMounted
and show a warning in dev mode if bothhiddenUntilFound
andkeepMounted={false}
are specified.