Skip to content

Commit 03a9d8a

Browse files
DevPioAJIXuMuKmichaelmaillot
authored
feat: ✨ method to clear the array (#1838)
Co-authored-by: Alex Terentiev <[email protected]> Co-authored-by: Michaël Maillot <[email protected]>
1 parent b6d5a23 commit 03a9d8a

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/controls/peoplepicker/PeoplePickerComponent.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,14 @@ export class PeoplePicker extends React.Component<IPeoplePickerProps, IPeoplePic
9595
}
9696
}
9797

98+
/**
99+
* clears all users and groups
100+
*/
101+
public clearSelectedPersons(): void {
102+
this.setState({
103+
selectedPersons: []
104+
});
105+
}
98106

99107
/**
100108
* Get initial persons
@@ -385,6 +393,3 @@ export class PeoplePicker extends React.Component<IPeoplePickerProps, IPeoplePic
385393
);
386394
}
387395
}
388-
389-
390-

0 commit comments

Comments
 (0)