Skip to content

Commit d60b6a9

Browse files
committed
fix #7906; mentions search in slate mode
1 parent c3b0299 commit d60b6a9

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/packages/frontend/editors/slate/slate-mentions/hook.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export const useMentions: (Options) => MentionsControl = ({
5151
}, [isVisible]);
5252

5353
const items: Item[] = useMemo(() => {
54-
return matchingUsers(search);
54+
return matchingUsers(search.toLowerCase());
5555
}, [search]);
5656

5757
const onKeyDown = useCallback(

src/packages/frontend/project_actions.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import { callback } from "awaiting";
1111
import { List, Map, Set, fromJS } from "immutable";
1212
import { isEqual } from "lodash";
1313
import { join } from "path";
14-
1514
import type { ChatState } from "@cocalc/frontend/chat/chat-indicator";
1615
import { initChat } from "@cocalc/frontend/chat/register";
1716
import * as computeServers from "@cocalc/frontend/compute/compute-servers-table";
@@ -1102,7 +1101,9 @@ export class ProjectActions extends Actions<ProjectStoreState> {
11021101

11031102
// Used by open/close chat below.
11041103
set_chat_state(path: string, chatState: ChatState): void {
1105-
if (this.open_files == null) return;
1104+
if (this.open_files == null) {
1105+
return;
1106+
}
11061107
this.open_files.set(path, "chatState", chatState);
11071108
local_storage(this.project_id, path, "chatState", chatState);
11081109
}

0 commit comments

Comments
 (0)