fix(table): table ui fixes (#33494)

Co-authored-by: Amaan Nawab <nelsondrew07@gmail.com>
This commit is contained in:
amaannawab923
2025-05-18 02:18:49 +05:30
committed by GitHub
parent af21ef2497
commit 217f11a8f7
6 changed files with 157 additions and 27 deletions

View File

@@ -113,6 +113,10 @@ const StyledSpace = styled(Space)`
}
`;
const StyledRow = styled.div`
display: flex;
`;
// Be sure to pass our updateMyData and the skipReset option
export default typedMemo(function DataTable<D extends object>({
tableClassName,
@@ -447,9 +451,9 @@ export default typedMemo(function DataTable<D extends object>({
>
{hasGlobalControl ? (
<div ref={globalControlRef} className="form-inline dt-controls">
<div className="row">
<StyledRow className="row">
<div
className={renderTimeComparisonDropdown ? 'col-sm-5' : 'col-sm-6'}
className={renderTimeComparisonDropdown ? 'col-sm-4' : 'col-sm-5'}
>
{hasPagination ? (
<SelectPageSize
@@ -466,7 +470,11 @@ export default typedMemo(function DataTable<D extends object>({
) : null}
</div>
{searchInput ? (
<StyledSpace className="col-sm-6">
<StyledSpace
className={
renderTimeComparisonDropdown ? 'col-sm-7' : 'col-sm-8'
}
>
{serverPagination && (
<div className="search-select-container">
<span className="search-by-label">Search by: </span>
@@ -500,7 +508,7 @@ export default typedMemo(function DataTable<D extends object>({
{renderTimeComparisonDropdown()}
</div>
) : null}
</div>
</StyledRow>
</div>
) : null}
{wrapStickyTable ? wrapStickyTable(renderTable) : renderTable()}