Home > Blockchain >  Is there a way to force tab unmount in ChakraUI tabs component?
Is there a way to force tab unmount in ChakraUI tabs component?

Time:11-09

I tried lazyBehavior="unmount" (which is the default). Anyway, it doesn't getting unmounted when tab changes..

https://codesandbox.io/s/friendly-hugle-jqezs?file=/src/App.tsx

CodePudding user response:

I think you are additionally missing:

isLazy={true}

Docs for the lazyBehavior prop say:

The lazy behavior of tab panels' content when not active. Only works when isLazy={true}

  • Related