Skip to content

Include componentDidUpdate cycle to refresh the updated keysets #24

@justinpark

Description

@justinpark

Can you add the componentDidUpdate cycle to refresh the update keyset combination?

I think the following code block will fix the problem.

componentDidUpdate({ keyName: prevKeyName }) {
    Hotkeys.unbind(prevKeyName as string);
    const { filter } = this.props;
    if (filter) {
      Hotkeys.filter = filter;
    }
    Hotkeys(this.props.keyName as string, this.onKeyDown);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions