Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mwarman committed Sep 24, 2024
1 parent bb85304 commit 51abc99
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
5 changes: 3 additions & 2 deletions src/common/components/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,13 @@ const Header = ({
</IonToolbar>

{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 (
<IonToolbar key={index} {...props}>
{children}
{isActiveProgressBar && isLastToolbar && <IonProgressBar {...progressBar} />}
{showProgressBar && <IonProgressBar {...progressBar} />}
</IonToolbar>
);
})}
Expand Down
3 changes: 1 addition & 2 deletions src/pages/Users/components/UserList/UserGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 1 addition & 2 deletions src/pages/Users/components/UserList/UserList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
4 changes: 2 additions & 2 deletions src/pages/Users/components/UserList/UserListPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 ?? '');
};

Expand All @@ -58,7 +58,7 @@ export const UserListPage = ({ testid = 'page-user-list' }: PropsWithTestId): JS
title="Users"
toolbars={[
{
children: <Searchbar debounce={500} onIonInput={onInputSearch} />,
children: <Searchbar debounce={500} onIonInput={handleInputSearch} />,
className: 'ls-toolbar-searchbar',
},
]}
Expand Down

0 comments on commit 51abc99

Please sign in to comment.