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

View File

@ -19,29 +19,6 @@
border: 1px solid @border-color-1; border: 1px solid @border-color-1;
overflow: hidden; 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 { .ant-table-body {
scrollbar-width: none; scrollbar-width: none;