Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions change/office-ui-fabric-react-2020-10-24-10-42-39-7.0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "patch",
"comment": "TextField: Use type from state iff canRevealPassword is true",
"packageName": "office-ui-fabric-react",
"email": "fahasanw@microsoft.com",
"dependentChangeType": "patch",
"date": "2020-10-24T05:12:39.137Z"
}
Original file line number Diff line number Diff line change
Expand Up @@ -484,12 +484,13 @@ export class TextFieldBase extends React.Component<ITextFieldProps, ITextFieldSt
'defaultValue',
]);
const ariaLabelledBy = this.props['aria-labelledby'] || (this.props.label ? this._labelId : undefined);
const type = this.props.canRevealPassword ? this.state.type : this.props.type ?? 'text';
return (
<input
id={this._id}
aria-labelledby={ariaLabelledBy}
{...inputProps}
type={this.state.type}
type={type}
ref={this._textElement as React.RefObject<HTMLInputElement>}
value={this.value || ''}
onInput={this._onInputChange}
Expand Down