MatBlazor icon indicating copy to clipboard operation
MatBlazor copied to clipboard

MatButton -> Focus property, or at least Ref property to get the ElementReference

Open jweschenfelder opened this issue 3 years ago • 0 comments

Describe the feature request I would like to be able to set the focus on a MatButton programmatically. For now, this feature is not available yet. Microsoft offers the method .FocusAsync(), but it is not working with MatButton, it is only working with ElementReference.

Currently, I cannot use the Ref property for the MatButton component as described here: https://www.matblazor.com/Button grafik I would await that Ref works, but it is not a recognized property: grafik

Expected behavior I wish, I could set the current focus on a MatButton or that I can at least get the ElementReference for the DOM element. If I use @ref, it will return the MatButton object, but not the ElementReference for the DOM element.

jweschenfelder avatar Mar 24 '21 14:03 jweschenfelder