Page MenuHomePhabricator

D10714.diff
No OneTemporary

D10714.diff

diff --git a/web/settings/relationship/user-list.css b/web/settings/relationship/user-list.css
--- a/web/settings/relationship/user-list.css
+++ b/web/settings/relationship/user-list.css
@@ -29,3 +29,9 @@
row-gap: 8px;
height: 625px;
}
+
+.emptyList {
+ text-align: center;
+ margin-top: 8px;
+ color: var(--text-background-tertiary-default);
+}
diff --git a/web/settings/relationship/user-list.react.js b/web/settings/relationship/user-list.react.js
--- a/web/settings/relationship/user-list.react.js
+++ b/web/settings/relationship/user-list.react.js
@@ -70,11 +70,24 @@
onMenuVisibilityChange={onMenuVisibilityChange}
/>
));
- }, [userRowComponent, usersWithENSNames, onMenuVisibilityChange]);
+ }, [usersWithENSNames, userRowComponent, onMenuVisibilityChange]);
+
+ const noResultsMessage = React.useMemo(() => {
+ if (searchText.length === 0 || usersWithENSNames.length > 0) {
+ return null;
+ }
+
+ return <div className={css.emptyList}>No results</div>;
+ }, [searchText.length, usersWithENSNames.length]);
const containerClasses = classNames(css.userListContainer, {
[css.noScroll]: isMenuVisible,
});
- return <div className={containerClasses}>{userRows}</div>;
+ return (
+ <div className={containerClasses}>
+ {userRows}
+ {noResultsMessage}
+ </div>
+ );
}

File Metadata

Mime Type
text/plain
Expires
Thu, Jan 9, 11:52 AM (9 h, 16 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2834316
Default Alt Text
D10714.diff (1 KB)

Event Timeline