Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #6663: Show how to preserve filter object when mixing column and … #6974

Merged
merged 1 commit into from
Aug 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions components/doc/datatable/filter/advanceddoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ export function AdvancedFilterDoc(props) {
basic: `
<DataTable value={customers} paginator showGridlines rows={10} loading={loading} dataKey="id"
filters={filters} globalFilterFields={['name', 'country.name', 'representative.name', 'balance', 'status']} header={header}
emptyMessage="No customers found.">
emptyMessage="No customers found." onFilter={(e) => setFilters(e.filters)}>
<Column field="name" header="Name" filter filterPlaceholder="Search by name" style={{ minWidth: '12rem' }} />
<Column header="Country" filterField="country.name" style={{ minWidth: '12rem' }} body={countryBodyTemplate}
filter filterPlaceholder="Search by country" filterClear={filterClearTemplate}
Expand Down Expand Up @@ -488,7 +488,7 @@ export default function AdvancedFilterDemo() {
<div className="card">
<DataTable value={customers} paginator showGridlines rows={10} loading={loading} dataKey="id"
filters={filters} globalFilterFields={['name', 'country.name', 'representative.name', 'balance', 'status']} header={header}
emptyMessage="No customers found.">
emptyMessage="No customers found." onFilter={(e) => setFilters(e.filters)}>
<Column field="name" header="Name" filter filterPlaceholder="Search by name" style={{ minWidth: '12rem' }} />
<Column header="Country" filterField="country.name" style={{ minWidth: '12rem' }} body={countryBodyTemplate}
filter filterPlaceholder="Search by country" filterClear={filterClearTemplate}
Expand Down Expand Up @@ -784,7 +784,7 @@ export default function AdvancedFilterDemo() {
<div className="card">
<DataTable value={customers} paginator showGridlines rows={10} loading={loading} dataKey="id"
filters={filters} globalFilterFields={['name', 'country.name', 'representative.name', 'balance', 'status']} header={header}
emptyMessage="No customers found.">
emptyMessage="No customers found." onFilter={(e) => setFilters(e.filters)}>
<Column field="name" header="Name" filter filterPlaceholder="Search by name" style={{ minWidth: '12rem' }} />
<Column header="Country" filterField="country.name" style={{ minWidth: '12rem' }} body={countryBodyTemplate}
filter filterPlaceholder="Search by country" filterClear={filterClearTemplate}
Expand Down Expand Up @@ -844,6 +844,7 @@ export default function AdvancedFilterDemo() {
globalFilterFields={['name', 'country.name', 'representative.name', 'balance', 'status']}
header={header}
emptyMessage="No customers found."
onFilter={(e) => setFilters(e.filters)}
>
<Column field="name" header="Name" filter filterPlaceholder="Search by name" style={{ minWidth: '12rem' }} />
<Column
Expand Down
Loading