Skip to content

Commit 3e71c90

Browse files
PathToSharePointAlex Terentiev
authored andcommitted
Trigger onChange on picker clear action
In the current release, the onChange event is not triggered when the selected item is reset to null (Clear button).
1 parent 7aa40ed commit 3e71c90

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/controls/locationPicker/LocationPicker.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,9 @@ export class LocationPicker extends React.Component<ILocationPickerProps, ILocat
214214

215215
private onIconButtonClick = () => {
216216
this.setState({ currentMode: Mode.empty, selectedItem: null });
217+
if (this.props.onChange) {
218+
this.props.onChange(null);
219+
}
217220
}
218221

219222
private onClick = () => {

0 commit comments

Comments
 (0)