-
-
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 😓
307c354
to
a07722b
Compare
a07722b
to
28adc8a
Compare
798e9a4
to
4f2ac80
Compare
4f2ac80
to
b457701
Compare
cd54b6c
to
bddd4f7
Compare
Also includes a lot of rework to the panel internals as the Select PR changed the timing of the This broke CSS transition handling, as it was using that 1 frame between the open state changing and |
bddd4f7
to
26a68fc
Compare
f8dd7a9
to
1238a2e
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.