Skip to content

Support handling multiple fields, not just search - #3

Merged
mmalfertheiner merged 9 commits into
mainfrom
support-filter
Nov 8, 2021
Merged

Support handling multiple fields, not just search#3
mmalfertheiner merged 9 commits into
mainfrom
support-filter

Conversation

@mmalfertheiner

Copy link
Copy Markdown
Member

In order to be more flexible, we need to be able to query mutliple fields and not just search.

Therefore I replaced search with query and let the user pass an object with multiple fields.

Example:

const {actions, queryParameters } = useQueryAndPagination({ defaultQueryParameters: { search: '' } })


const search = (value) => {actions.query({search: value})}
const filterDepartment = (value) => {actions.query({department: value})}

@mmalfertheiner
mmalfertheiner marked this pull request as ready for review November 8, 2021 09:28
@mmalfertheiner
mmalfertheiner merged commit 183e5ba into main Nov 8, 2021
@mmalfertheiner
mmalfertheiner deleted the support-filter branch November 8, 2021 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant