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

Add hook beforeFilterValueOptionsShow for customize options order in fiter dropdown menu #8373

Closed
wants to merge 7 commits into from

Conversation

hh54188
Copy link

@hh54188 hh54188 commented Jul 7, 2021

Context

Provide the ability to adjust options order in filter dropdown menu.

How has this been tested?

I have added two tests in filters.spec.js hooks section

  • Verify new beforeFilterValueOptionsShow hook will be called before when dropdown is show.
  • Verify hook handler could modify dropdown menus order.

Also all unit and e2e tests have passed.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature or improvement (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Additional language file or change to the existing one (translations)

Related issue(s):

Affected project(s):

  • handsontable
  • @handsontable/angular
  • @handsontable/react
  • @handsontable/vue

Checklist:

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jul 7, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit bd70668:

Sandbox Source
vanilla-handsontable-pr Configuration

@AMBudnik
Copy link
Contributor

AMBudnik commented Jul 7, 2021

Hi @hh54188

Thank you for your effort to share this idea with us.

I see that you have added tests and signed the CLA. Could you also change the branch to develop? We do not accept PRs to the master branch.

@hh54188 hh54188 changed the base branch from master to develop July 7, 2021 07:57
@hh54188
Copy link
Author

hh54188 commented Jul 7, 2021

@AMBudnik Sorry about that, I have change the branch to develop

@AMBudnik
Copy link
Contributor

Hi @hh54188

I just got a review summary for your pull request from one of our developers.

There are some aspects that we would need to discuss if we would like to adapt your approach. Firstly, we are cautious about adding new hooks. It is wise to gather more information about specific actions. However, it also forces us to maintain the hook and connections to all of the related plugins. We also see some default actions changed, which leads to a breaking change, not to mention conflicts in files.

Generally, the idea is exciting, and I can imagine why you would like to have this ability. But at this point, I can see two possible approaches

  • you can use your solution in your project as a custom code
  • We can discuss the subject further on Github Discussions

In both ways, I need to close this pull request and once again thank you for the effort to share this with us.

@AMBudnik AMBudnik closed this Sep 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants