-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #304 from AppQuality/fix-chat-shortcut
fixed behaviour when editor is empty
- Loading branch information
Showing
5 changed files
with
19 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,52 +58,61 @@ const ChatPanel = ({ background, ...args }: EditorStoryArgs) => { | |
}; | ||
|
||
const Template: StoryFn<EditorStoryArgs> = ({ children, ...args }) => { | ||
const getUsers = async ({ query }: { query: string }) => { | ||
const getUsers = ({ query }: { query: string }) => { | ||
return [ | ||
{ | ||
id: 1, | ||
name: "John Doe", | ||
avatar: "https://i.pravatar.cc/150?img=1", | ||
email:"[email protected]" | ||
}, | ||
{ | ||
id: 2, | ||
name: "Jane Doe", | ||
avatar: "https://i.pravatar.cc/150?img=2", | ||
email:"[email protected]" | ||
}, | ||
{ | ||
id: 3, | ||
name: "John Smith", | ||
avatar: "https://i.pravatar.cc/150?img=3", | ||
email:"[email protected]" | ||
}, | ||
{ | ||
id: 4, | ||
name: "Jane Smith", | ||
avatar: "https://i.pravatar.cc/150?img=4", | ||
email:"[email protected]" | ||
}, | ||
{ | ||
id: 5, | ||
name: "Pippo Baudo", | ||
avatar: "https://i.pravatar.cc/150?img=5", | ||
email:"[email protected]" | ||
}, | ||
{ | ||
id: 6, | ||
name: "Pippo Franco", | ||
avatar: "https://i.pravatar.cc/150?img=6", | ||
email:"[email protected]" | ||
}, | ||
{ | ||
id: 7, | ||
name: "Pippo Inzaghi", | ||
avatar: "https://i.pravatar.cc/150?img=7", | ||
email:"[email protected]" | ||
}, | ||
{ | ||
id: 8, | ||
name: "Pippo Civati", | ||
avatar: "https://i.pravatar.cc/150?img=8", | ||
email:"[email protected]" | ||
}, | ||
{ | ||
id: 9, | ||
name: "Pippo Delbono", | ||
avatar: "https://i.pravatar.cc/150?img=9", | ||
email:"[email protected]" | ||
}, | ||
].filter((item) => { | ||
if (!query) return item; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters