Skip to content
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

Allow setting isActive on a Panel in an uncontrolled Collapse #93

Open
thomasmery opened this issue Nov 5, 2018 · 2 comments
Open

Allow setting isActive on a Panel in an uncontrolled Collapse #93

thomasmery opened this issue Nov 5, 2018 · 2 comments

Comments

@thomasmery
Copy link

thomasmery commented Nov 5, 2018

Hi there,

thanks for this component, it really helps a lot

only thing I'm having difficulty with is being able to simply open panel programatically by passing a isActive prop to the panel without having to go the whole controlled way (with activeKey on the Collapse)

is it possible?

thanks a lot

@isuke01
Copy link

isuke01 commented May 17, 2019

I think for now you can control it programatically by passing defaultActiveKey={['1'],['2']} to collapse element if you want to have by default open 1 and 2 would be nice if we can pass to panel just isActive as true :)

@fartinmartin
Copy link

fartinmartin commented Apr 8, 2020

@isuke01 I'm not having much luck with defaultActiveKey={['1'],['2']}. Rather than having panel 1 and 2 open by default it seems to only evaluate the last array (['2']) and therefore only render panel 2 open. Any ideas?

Edit: CodeSandbox Link

Edit: I've somehow got this working in production but not in this demo 🤔

Edit: Got it to work in the demo by using an array of strings (defaultActiveKey={["1", "2"]}) instead of an array (maybe? not actually sure what this is) of arrays of strings (defaultActiveKey={['1'],['2']}). The CodeSandbox has been updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants