1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-11 20:22:36 +03:00

Trim spurious whitespace of "Explore rooms" menu input (#7431)

* Trim spurious whitespace of "Explore rooms" menu input

Trims the whitespace around the input string in order to
show relevant room suggestions and the "Join" button.

Fixes https://github.com/vector-im/element-web/issues/19728

Signed-off by: Ingrid Budau inigiri@posteo.jp

* Add safe navigation

Co-authored-by: Travis Ralston <travpc@gmail.com>

Co-authored-by: Travis Ralston <travpc@gmail.com>
This commit is contained in:
Ingrid
2021-12-22 17:16:51 +01:00
committed by GitHub
parent cd04799cb4
commit defbe16448

View File

@@ -393,7 +393,7 @@ export default class RoomDirectory extends React.Component<IProps, IState> {
private onFilterChange = (alias: string) => {
this.setState({
filterString: alias || "",
filterString: alias?.trim() || "",
});
// don't send the request for a little bit,