How to expand all rows by default? #2134
Answered
by
rantibi
Kavimugilan17
asked this question in
General
-
HI, Codesandbox Link: |
Beta Was this translation helpful? Give feedback.
Answered by
rantibi
Apr 15, 2020
Replies: 2 comments 1 reply
-
just add the following: |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Kavimugilan17
-
Please don't use an effect to achieve this. Simply set expanded to true when creating your useState for the expanding. const [expanded, setExpanded] = useState<ExpandedState>(true); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
just add the following:
useEffect(() => { toggleAllRowsExpanded(); }, []);