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

Reset filters button #82

Merged
merged 8 commits into from
Aug 22, 2023
Merged

Reset filters button #82

merged 8 commits into from
Aug 22, 2023

Conversation

pranavkparti
Copy link
Collaborator

@pranavkparti pranavkparti commented Aug 17, 2023

Description

A button to reset My Transfer table filters is implemented.

Issue(s) addressed

What kind of change(s) does this PR introduce?

  • Enhancement
  • Bug fix
  • Refactor

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

Issue

What is the current behavior?
Currently, there is no way to reset the table filters without manually changing the values.

What is the new behavior?

  • A Reset button is added as given below:

image

Recording 2023-08-21 at 20 36 57

Breaking change

Does this PR introduce a breaking change?
No.

Other useful information

None.

return (
<FilterResetButton
onClick={() => setFilter(defaultFilter)}
type='submit'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it should be 'button' instead as there is no form data to submit


export const FilterResetButton = styled(Button)({
color: '#fff',
height: '40px',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that you mostly use px in a markup, and it is maybe not a problem here as it is a small button, but I would suggest using relative units instead like rem, so it would look similar on different scales.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the reset button is typically found on the right-hand side of the filters. Anyway, the design of the filters will most likely be changed in V2, but if it is not a problem, I would move this button to the right.

@OlhaD OlhaD merged commit e8f5e6e into Greenstand:v1 Aug 22, 2023
1 check passed
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.

My Transfers V1: Button to reset all filters.
2 participants