Fixed inconsistent search in emojiboard.
Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
parent
36380fe5fd
commit
f70270a0b3
2 changed files with 4 additions and 4 deletions
|
@ -87,10 +87,10 @@ function SearchedEmoji() {
|
||||||
function handleSearchEmoji(resultEmojis, term) {
|
function handleSearchEmoji(resultEmojis, term) {
|
||||||
if (term === '' || resultEmojis.length === 0) {
|
if (term === '' || resultEmojis.length === 0) {
|
||||||
if (term === '') setSearchedEmojis(null);
|
if (term === '') setSearchedEmojis(null);
|
||||||
else setSearchedEmojis([]);
|
else setSearchedEmojis({ emojis: [] });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
setSearchedEmojis(resultEmojis);
|
setSearchedEmojis({ emojis: resultEmojis });
|
||||||
}
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
@ -102,7 +102,7 @@ function SearchedEmoji() {
|
||||||
|
|
||||||
if (searchedEmojis === null) return false;
|
if (searchedEmojis === null) return false;
|
||||||
|
|
||||||
return <EmojiGroup key="-1" name={searchedEmojis.length === 0 ? 'No search result found' : 'Search results'} groupEmojis={searchedEmojis} />;
|
return <EmojiGroup key="-1" name={searchedEmojis.emojis.length === 0 ? 'No search result found' : 'Search results'} groupEmojis={searchedEmojis.emojis} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
function EmojiBoard({ onSelect }) {
|
function EmojiBoard({ onSelect }) {
|
||||||
|
|
|
@ -149,7 +149,7 @@ function PeopleDrawer({ roomId }) {
|
||||||
}
|
}
|
||||||
<div className="people-drawer__load-more">
|
<div className="people-drawer__load-more">
|
||||||
{
|
{
|
||||||
mList.length !== 0 && mList.length > itemCount && (
|
mList.length !== 0 && memberList.length > itemCount && (
|
||||||
<Button onClick={loadMorePeople}>View more</Button>
|
<Button onClick={loadMorePeople}>View more</Button>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue