Only the last tab of the tab component of antd in react can dynamically add className.

in the tab of antd

multiple tab pages reuse a component with onscroll control class name changing state control class name

but open the 1tab page to scroll, have the class name,
then open 2, also have,

If you return 1tab after

, you won"t add the class name dynamically. Ask what the problem is

.

has solved the problem that window.onscroll should be changed to addeventlistener

Apr.21,2022

has solved the problem that window.onscroll should be changed to addeventlistener

Menu