Focus on a icon when clicked

Lots of knowledge to lay down here...

For an element (Component) to receive focus, it must have an emitted HTML tabindex attribute. Icons do not have this. Most displays don't. Some do (Tables, Dashboard, Tag Browse Tree) because those Display components actually contain an input.

So as of today, there is no way to apply/force focus onto most of our display components.

We just happen to be working on a feature for 8.1.39 which allows for specifying a tabIndex prop as part of the META category for every component which would allow for this functionality. This does NOT, however, mean that you should do this. Ask yourself why you're breaking an HTML pattern and if there's some other component or approach you could use instead.

2 Likes