fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

Focussing on a textfield in a dialog box

Open ankitk94 opened this issue 9 years ago • 2 comments

When a dialog is opened, I want to set the default focus to a TextField created using office fabric. The issue is to do that, I need to provide the className of the element as value to "firstFocusableSelector" prop of dialog. But in case of TextField, OfficeFabric creates it like this:

That property requires the value as className of input and not div, but by current behaviour of TextField component, I can only provide className to the "div" and not "input".

ankitk94 avatar Jan 18 '17 08:01 ankitk94

@ankitk94, there is a property inputClassName to allow adding classes to input element on TextField, have you tried that?

mdahamiwal avatar Jan 18 '17 16:01 mdahamiwal

It worked. Thanks.

ankitk94 avatar Jan 19 '17 10:01 ankitk94