Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

CDataTable Reset Page to Zero on Filter #267

Unanswered
james-e-morris asked this question in Q&A
Discussion options

Is there a way to trigger the table to go back to page zero if column filter changes? There is an onColumnFilterChange function, but I don't see a way to set the current page or access the setPage function within the component.

<CDataTable
 fields={fields}
 items={items}
 columnFilterValue={columnFilterState}
 columnFilter={{ external: true }}
 onColumnFilterChange={(columnFilterState) => {
 setpage(0) // this obviously won't work without a reference to the component
 const filteredColState = pickBy(columnFilterState, Boolean);
 this.setState({ columnFilterState });
 }}
/>
You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /