0

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

4

1 回答 1

1

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}

于 2021-11-08T21:11:09.477 回答