Skip to content

Commit

Permalink
Searchbox: deprecate defaultValue (#4225)
Browse files Browse the repository at this point in the history
* Deprecate SearchBox defaultValue prop.

* npm run change output
  • Loading branch information
jordandrako authored and dzearing committed Mar 27, 2018
1 parent 6325dee commit 7bed353
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"packageName": "office-ui-fabric-react",
"comment": "Deprecate SearchBox defaultValue prop.",
"type": "minor"
}
],
"packageName": "office-ui-fabric-react",
"email": "[email protected]"
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ export class SearchBoxBase extends BaseComponent<ISearchBoxProps, ISearchBoxStat
super(props);

this._warnDeprecations({
'labelText': 'placeholder'
'labelText': 'placeholder',
'defaultValue': 'value'
});

this._latestValue = props.value || '';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ export interface ISearchBoxProps extends React.InputHTMLAttributes<HTMLInputElem

/**
* The default value of the text in the SearchBox, in the case of an uncontrolled component.
* Up till now, this has not been implemented, deprecating. Will re-implement if uncontrolled
* component behavior is implemented.
* @deprecated
*/
defaultValue?: string;

Expand Down

0 comments on commit 7bed353

Please sign in to comment.