reverted the table header changes (#20687)

* draft:table header

* undo table changes

---------

Co-authored-by: Ashish Gupta <ashish@getcollate.io>
This commit is contained in:
Dhruv Parmar 2025-04-09 12:55:31 +05:30 committed by GitHub
parent f1f768ce46
commit 995a74e8d9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 19 additions and 53 deletions

View File

@ -47,7 +47,6 @@ import {
handleUpdateTableColumnSelections,
} from '../../../utils/TableUtils';
import { useGenericContext } from '../../Customization/GenericProvider/GenericProvider';
import AppBadge from '../Badge/Badge.component';
import Loader from '../Loader/Loader';
import NextPrevious from '../NextPrevious/NextPrevious';
import Searchbar from '../SearchBarComponent/SearchBar.component';
@ -242,41 +241,31 @@ const Table = <T extends Record<string, unknown>>(
return (
<Row className={classNames('table-container', rest.containerClassName)}>
<Col span={24}>
<Row className="p-md">
<Col span={12}>
<div className="h-full d-flex items-center">
<div className="table-data-count-container">
<Typography.Text>{t('label.table-plural')}</Typography.Text>
<AppBadge
className="total-count-badge"
label={(
customPaginationProps?.paging?.total ??
(rest.dataSource ?? []).length
).toString()}
/>
</div>
{searchProps ? (
<Searchbar
{...searchProps}
removeMargin
containerClassName="m-l-xlg w-400"
placeholder={searchProps?.placeholder ?? t('label.search')}
searchValue={searchProps?.value}
typingInterval={searchProps?.searchDebounceTime ?? 500}
onSearch={handleSearchAction}
/>
) : null}
</div>
</Col>
<Col
className={classNames({
'p-y-md': searchProps ?? rest.extraTableFilters ?? !isFullViewTable,
})}
span={24}>
<Row className="p-x-md">
{searchProps ? (
<Col span={12}>
<Searchbar
{...searchProps}
removeMargin
placeholder={searchProps?.placeholder ?? t('label.search')}
searchValue={searchProps?.value}
typingInterval={searchProps?.searchDebounceTime ?? 500}
onSearch={handleSearchAction}
/>
</Col>
) : null}
{(rest.extraTableFilters || !isFullViewTable) && (
<Col
className={classNames(
'd-flex justify-end items-center gap-5',
rest.extraTableFiltersClassName
)}
span={12}>
span={searchProps ? 12 : 24}>
{rest.extraTableFilters}
{!isFullViewTable && (
<DndProvider backend={HTML5Backend}>

View File

@ -19,29 +19,6 @@
border: 1px solid @border-color-1;
overflow: hidden;
.table-data-count-container {
display: flex;
align-items: center;
gap: 8px;
.ant-typography {
font-size: 16px;
font-weight: 600;
color: @text-color;
}
.total-count-badge {
background-color: @blue-1;
padding: 6px 12px;
.ant-typography {
color: @primary-color;
font-size: 12px;
font-weight: 500;
}
}
}
.ant-table-body {
scrollbar-width: none;