Skip to content

Commit 9e2ed3b

Browse files
committed
Merge branch 'jason-appliedis-PlaceHolderRender' into dev
2 parents 565793f + 97316f5 commit 9e2ed3b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/controls/placeholder/PlaceholderComponent.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,17 @@ export class Placeholder extends React.Component<IPlaceholderProps, IPlaceholder
5454
* @param nextState
5555
*/
5656
public shouldComponentUpdate(nextProps: IPlaceholderProps, nextState: IPlaceholderState): boolean {
57+
/*
58+
* compare the props object for changes in primative values
59+
* Return/re-render, bexeting the function, if the props change
60+
*/
61+
for (const property in nextProps) {
62+
if (property != '_onConfigure'){
63+
if (nextProps[property] != this.props[property]) {
64+
return true;
65+
}
66+
}
67+
}
5768
return this.state.width !== nextState.width || this.props.hideButton !== nextProps.hideButton;
5869
}
5970

0 commit comments

Comments
 (0)