Fixes table header (#1087)

* Wrap up Front chat

* Wrap up Front chat

* Disable entity selectionwhen starting from menu
This commit is contained in:
Charles Bochet
2023-08-04 19:27:48 -07:00
committed by GitHub
parent 6008789a17
commit 1bf44e0188
4 changed files with 17 additions and 12 deletions
@@ -1,4 +1,3 @@
import { Ref } from 'react';
import { useRecoilValue } from 'recoil';
import { isNavbarSwitchingSizeState } from '@/ui/layout/states/isNavbarSwitchingSizeState';
@@ -10,11 +9,7 @@ import { tableRowIdsState } from '../states/tableRowIdsState';
import { EntityTableRow } from './EntityTableRow';
type OwnProps = {
tbodyRef: Ref<HTMLTableSectionElement>;
};
export function EntityTableBody({ tbodyRef }: OwnProps) {
export function EntityTableBody() {
const rowIds = useRecoilValue(tableRowIdsState);
const isNavbarSwitchingSize = useRecoilValue(isNavbarSwitchingSizeState);
@@ -28,7 +23,7 @@ export function EntityTableBody({ tbodyRef }: OwnProps) {
}
return (
<tbody ref={tbodyRef}>
<tbody>
{rowIds.map((rowId, index) => (
<RowIdContext.Provider value={rowId} key={rowId}>
<RowIndexContext.Provider value={index}>