react-sidenav icon indicating copy to clipboard operation
react-sidenav copied to clipboard

collapse submenu for item after select another item

Open cocodrino opened this issue 5 years ago • 4 comments

Hi, probably the title is not the best, but basically I plan create a nav similar to this example

https://codesandbox.io/s/03xry073qw

here refund is selected, my intention is that if I select Users the subnav Transactions collapse and doesnt display inner items...

image

do you think that is it possible?...how would you achieve this?..thank you so much

cocodrino avatar Dec 16 '19 14:12 cocodrino

Hi,

Just render items under Transactions as normal navs but create a renderer such that they are indented. Dont render them as sub navigation.

Cheers, Warren

On Mon, 16 Dec 2019, 10:58 pm carlos L, [email protected] wrote:

Hi, probably the title is not the best, but basically I plan create a nav similar to this example

https://codesandbox.io/s/03xry073qw

here refund is selected, my intention is that if I select Users the subnav Transactions collapse and doesnt display inner items...

[image: image] https://user-images.githubusercontent.com/616412/70916697-7e50e980-1ff2-11ea-84a7-c70f8de16f85.png

do you think that is it possible?...how would you achieve this?..thank you so much

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/wmira/react-sidenav/issues/88?email_source=notifications&email_token=AADSMEDB4VQQ3QFABDFRVKDQY6JPXA5CNFSM4J3LF4VKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IAYKDBQ, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADSMECAQFEHVU6YFTORB7LQY6JPXANCNFSM4J3LF4VA .

wmira avatar Dec 16 '19 23:12 wmira

hi thanks @wmira I'm not totally clear with this, if I render them nested them the nav doesnt collapse (at least to me) if you can provide me a code for guide me I'd appreciate that

cocodrino avatar Dec 17 '19 13:12 cocodrino

sorry @wmira I can't undersand it yet, I've tried in different ways and it doesn't work

not sure if my requirement was understand ok...I need... for instance...that when you click in Transaction/Orders and then in Dashboard/C the transaction panel automatically close because it's not active anymore

https://codesandbox.io/s/infallible-taussig-dmdo5

cocodrino avatar Jan 03 '20 12:01 cocodrino

same issue

GolfredoPerezFernandez avatar Jun 26 '21 20:06 GolfredoPerezFernandez