Skip to content

Commit

Permalink
fix: table row expansion issue
Browse files Browse the repository at this point in the history
affects: @medly-components/core
  • Loading branch information
gmukul01 committed Dec 3, 2024
1 parent 99a26a6 commit dd62835
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/core/src/components/Table/Body/Row/Row.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ export const Row: FC<RowProps> = memo(props => {
if (isNavigated) onRowNavigated && onRowNavigated(data);
}, [isNavigated, onRowNavigated]);

const defaultRowExpansion = defaultRowExpandKey && data[defaultRowExpandKey];
useEffect(() => {
setExpansionState(defaultRowExpansion);
}, [defaultRowExpansion]);

// TODO: Check why useKeypress is not working in this case
const handleRowClickFromKeyboard = useCallback(
(e: KeyboardEvent<HTMLTableRowElement>) => {
Expand Down

0 comments on commit dd62835

Please sign in to comment.