From 51abc99cb9a0ff722e4e897d45a3f055c4a3a99f Mon Sep 17 00:00:00 2001 From: Matthew Warman Date: Tue, 24 Sep 2024 08:30:21 -0400 Subject: [PATCH] fixes --- src/common/components/Header/Header.tsx | 5 +++-- src/pages/Users/components/UserList/UserGrid.tsx | 3 +-- src/pages/Users/components/UserList/UserList.tsx | 3 +-- src/pages/Users/components/UserList/UserListPage.tsx | 4 ++-- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/common/components/Header/Header.tsx b/src/common/components/Header/Header.tsx index e8e26f2..c8368b9 100644 --- a/src/common/components/Header/Header.tsx +++ b/src/common/components/Header/Header.tsx @@ -88,12 +88,13 @@ const Header = ({ {toolbars?.map((toolbarProps, index) => { - const isLastToolbar = toolbars.length - 1 === index; + const isLastToolbar: boolean = toolbars.length === index + 1; + const showProgressBar: boolean = isActiveProgressBar && isLastToolbar; const { children, ...props } = toolbarProps; return ( {children} - {isActiveProgressBar && isLastToolbar && } + {showProgressBar && } ); })} diff --git a/src/pages/Users/components/UserList/UserGrid.tsx b/src/pages/Users/components/UserList/UserGrid.tsx index 0e5bea8..2f59931 100644 --- a/src/pages/Users/components/UserList/UserGrid.tsx +++ b/src/pages/Users/components/UserList/UserGrid.tsx @@ -14,8 +14,7 @@ import EmptyCard from 'common/components/Card/EmptyCard'; /** * Properties for the `UserGrid` component. - * @param {string} [filterBy] - Optional. Filter the collection of users by a - * partial `name` match. + * @param {string} [filterBy] - Optional. Critera to filter the list of `Users`. * @see {@link BaseComponentProps} */ interface UserGridProps extends BaseComponentProps { diff --git a/src/pages/Users/components/UserList/UserList.tsx b/src/pages/Users/components/UserList/UserList.tsx index 5cf99e5..fe1a409 100644 --- a/src/pages/Users/components/UserList/UserList.tsx +++ b/src/pages/Users/components/UserList/UserList.tsx @@ -14,8 +14,7 @@ import EmptyCard from 'common/components/Card/EmptyCard'; /** * Properties for the `UserList` component. - * @param {string} [filterBy] - Optional. Filter the collection of users by a - * partial `name` match. + * @param {string} [filterBy] - Optional. Critera to filter the list of `Users`. * @param {string} [header] - Optional. The list header title. Default: `Users`. * @param {boolean} [showHeader] - Optional. Indicates if the header is shown. Default: `false`. * @see {@link BaseComponentProps} diff --git a/src/pages/Users/components/UserList/UserListPage.tsx b/src/pages/Users/components/UserList/UserListPage.tsx index a4a3015..3cbef3b 100644 --- a/src/pages/Users/components/UserList/UserListPage.tsx +++ b/src/pages/Users/components/UserList/UserListPage.tsx @@ -47,7 +47,7 @@ export const UserListPage = ({ testid = 'page-user-list' }: PropsWithTestId): JS * Handle changes to the search toolbar value as a user types. * @param {SearchbarCustomEvent} event - The event. */ - const onInputSearch = (event: SearchbarCustomEvent) => { + const handleInputSearch = (event: SearchbarCustomEvent) => { setSearch(event.target.value ?? ''); }; @@ -58,7 +58,7 @@ export const UserListPage = ({ testid = 'page-user-list' }: PropsWithTestId): JS title="Users" toolbars={[ { - children: , + children: , className: 'ls-toolbar-searchbar', }, ]}