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

HotkeysProvider does not work properly when Table is rendered on the same page #4789

Closed
adidahiya opened this issue Jul 1, 2021 · 0 comments · Fixed by #4790
Closed

HotkeysProvider does not work properly when Table is rendered on the same page #4789

adidahiya opened this issue Jul 1, 2021 · 0 comments · Fixed by #4790

Comments

@adidahiya
Copy link
Contributor

adidahiya commented Jul 1, 2021

Environment

  • Package version(s): core 3.46.0, table 3.8.34
  • Operating System: macOS
  • Browser name and version: Chrome

Steps to reproduce

  1. Use HotkeysProvider, register some global hotkeys
  2. Render a Table on the same page
  3. Open the hotkeys dialog with "?"

Actual behavior

You get two dialogs open, one of them is empty (the one triggered by the old @HotkeysTarget API, used in <Table>).

You can even repro this in the documentation "Table features" page

image

Expected behavior

The two hotkeys APIs should not interfere

Possible solution

Converting Table to HotkeysTarget2 seems to work (despite some duplicate keys displayed), but we can’t introduce a breaking change to Table right now (requiring HotkeysProvider in place)... so we can either

  • create a new Table2 component which uses HotkeysTarget2, or
  • edit HotkeysEvents to not display the dialog if there are no hotkeys to show (this is a bit of a band-aid)

Since we’re going to need to migrate people to a new version of Table which uses new hotkeys anyway, we should probably make Table2...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant