Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Trim spurious whitespace of "Explore rooms" menu input (#7431)
Browse files Browse the repository at this point in the history
* 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 element-hq/element-web#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>
  • Loading branch information
twigleingrid and turt2live authored Dec 22, 2021
1 parent cd04799 commit defbe16
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/structures/RoomDirectory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit defbe16

Please sign in to comment.