rdkcentral / Lightning-UI-Components

Lightning UI Components

Home Page:https://rdkcentral.github.io/Lightning-UI-Components

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature request: Column/Row fire an event when _handleKey

jhderojasUVa opened this issue · comments

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.

👋

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.