(fix): Filter/sort button positioning (#928)
This commit is contained in:
@ -72,6 +72,18 @@ const StyledTableWithHeader = styled.div`
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
const StyledTableContainer = styled.div`
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
height: 100%;
|
||||||
|
overflow: auto;
|
||||||
|
`;
|
||||||
|
|
||||||
|
const StyledTableWrapper = styled.div`
|
||||||
|
flex: 1;
|
||||||
|
overflow: auto;
|
||||||
|
`;
|
||||||
|
|
||||||
type OwnProps<SortField> = {
|
type OwnProps<SortField> = {
|
||||||
columns: Array<TableColumn>;
|
columns: Array<TableColumn>;
|
||||||
viewName: string;
|
viewName: string;
|
||||||
@ -109,18 +121,20 @@ export function EntityTable<SortField>({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<StyledTableWithHeader>
|
<StyledTableWithHeader>
|
||||||
<TableHeader
|
<StyledTableContainer ref={tableBodyRef}>
|
||||||
viewName={viewName}
|
<TableHeader
|
||||||
viewIcon={viewIcon}
|
viewName={viewName}
|
||||||
availableSorts={availableSorts}
|
viewIcon={viewIcon}
|
||||||
onSortsUpdate={onSortsUpdate}
|
availableSorts={availableSorts}
|
||||||
/>
|
onSortsUpdate={onSortsUpdate}
|
||||||
<div ref={tableBodyRef}>
|
/>
|
||||||
<StyledTable>
|
<StyledTableWrapper>
|
||||||
<EntityTableHeader columns={columns} />
|
<StyledTable>
|
||||||
<EntityTableBody columns={columns} />
|
<EntityTableHeader columns={columns} />
|
||||||
</StyledTable>
|
<EntityTableBody columns={columns} />
|
||||||
</div>
|
</StyledTable>
|
||||||
|
</StyledTableWrapper>
|
||||||
|
</StyledTableContainer>
|
||||||
</StyledTableWithHeader>
|
</StyledTableWithHeader>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user