FocusManager guide

Focus Manager

Focus manager born like a necessity to have a manual control of focus and relieve browser from that work. Is important for us to know which component is currently selected and apply the corresponding event. We have been created a FocusManagerModule ir order to handle directives and services.

FocusManagerService

This is a service class with a group of functions that basically handles the focus action for the application, validates if a column of Data Manager has focus, triggers data manager events if required, handles focus in and focus out classes.

FocusableDirective

Angular directive class that has '[wmFocusable]' as a selector which is applied to all components. This class determines whether a component needs to be focus.

How to use

If you want to led focus manager handle your component focus just add directive

<input  wmFocusable >

Important facts

It is important to check that each control has a focusableElement defined, this should be the correct way to applyFocus.

Any control with the flag isFocused true must be focused and then turned in to false by the focusable directive.

Last updated