diff --git a/common/changes/office-ui-fabric-react/jg-textfield-fix-input-classname_2018-08-17-16-47.json b/common/changes/office-ui-fabric-react/jg-textfield-fix-input-classname_2018-08-17-16-47.json new file mode 100644 index 00000000000000..103ecaf3456342 --- /dev/null +++ b/common/changes/office-ui-fabric-react/jg-textfield-fix-input-classname_2018-08-17-16-47.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "packageName": "office-ui-fabric-react", + "comment": "TextField: Fix application of inputClassName lost when component was converted to JS styling.", + "type": "patch" + } + ], + "packageName": "office-ui-fabric-react", + "email": "jagore@microsoft.com" +} \ No newline at end of file diff --git a/packages/office-ui-fabric-react/src/components/TextField/TextField.base.tsx b/packages/office-ui-fabric-react/src/components/TextField/TextField.base.tsx index 8c33e5316b9625..9e5787b689e84b 100644 --- a/packages/office-ui-fabric-react/src/components/TextField/TextField.base.tsx +++ b/packages/office-ui-fabric-react/src/components/TextField/TextField.base.tsx @@ -163,6 +163,7 @@ export class TextFieldBase extends BaseComponent { } it('renders TextField correctly', () => { - const component = renderer.create(); + const className = 'testClassName'; + const inputClassName = 'testInputClassName'; + const component = renderer.create( + + ); const tree = component.toJSON(); expect(tree).toMatchSnapshot(); }); diff --git a/packages/office-ui-fabric-react/src/components/TextField/TextField.types.ts b/packages/office-ui-fabric-react/src/components/TextField/TextField.types.ts index 6a30b987c600d6..cab4f5ba0e4e1c 100644 --- a/packages/office-ui-fabric-react/src/components/TextField/TextField.types.ts +++ b/packages/office-ui-fabric-react/src/components/TextField/TextField.types.ts @@ -290,7 +290,15 @@ export interface ITextFieldProps extends React.AllHTMLAttributes> & Pick< ITextFieldProps, - 'className' | 'disabled' | 'required' | 'multiline' | 'borderless' | 'resizable' | 'underlined' | 'iconClass' + | 'className' + | 'disabled' + | 'inputClassName' + | 'required' + | 'multiline' + | 'borderless' + | 'resizable' + | 'underlined' + | 'iconClass' > & { /** Element has an error message. */ hasErrorMessage?: boolean; diff --git a/packages/office-ui-fabric-react/src/components/TextField/__snapshots__/TextField.test.tsx.snap b/packages/office-ui-fabric-react/src/components/TextField/__snapshots__/TextField.test.tsx.snap index 8a4f1af8d6f17e..da0926ecb94e5d 100644 --- a/packages/office-ui-fabric-react/src/components/TextField/__snapshots__/TextField.test.tsx.snap +++ b/packages/office-ui-fabric-react/src/components/TextField/__snapshots__/TextField.test.tsx.snap @@ -4,6 +4,7 @@ exports[`TextField renders TextField correctly 1`] = `