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

Feature request: Column/Row fire an event when _handleKey #15

Closed
jhderojasUVa opened this issue Nov 19, 2020 · 1 comment
Closed

Feature request: Column/Row fire an event when _handleKey #15

jhderojasUVa opened this issue Nov 19, 2020 · 1 comment

Comments

@jhderojasUVa
Copy link

Hi,

This is not an issue or a problem, is a request.

It will be nice to have some event on some _handleKeys so we can perform some actions when it happens. For example. in a column will be nice to have an event when you press up (or down) so the application can, for example, not only move into the items but to do an extra thing (whatever).

The same for the rows.

I know this can be done by extending the class and doing by your own, and I don't know if this will be useful to others.

@chiefcll
Copy link
Contributor

👋

Two ways I can think of for you to do this now - Row and column include an onScreenEffect callback which is called after rendering happens to allow you to customize the items. https://rdkcentral.github.io/Lightning-UI-Components/?path=/story/column--rainbow-screen-effect

Alternatively, you can use _captureKey on a parent component to intercept Up / Down or Left / Right before column and row gets them. https://rdkcentral.github.io/Lightning/docs/focus/keyhandler
Then return false to allow column and row to continue working.

Let me know if those solutions work for you.

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

No branches or pull requests

2 participants