Skip to content

Commit

Permalink
Review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
denniskigen committed Oct 23, 2024
1 parent 379d1ce commit 88af7f7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,17 +133,18 @@ function DefaultQueueTable() {
queueUuid={null}
statusUuid={null}
ExpandedRow={QueueTableExpandedRow}
tableFilters={[
<QueueDropdownFilter />,
<StatusDropdownFilter />,
<TableToolbarSearch
className={styles.search}
onChange={(e) => setSearchTerm(e.target.value)}
placeholder={t('searchThisList', 'Search this list')}
size={isDesktop(layout) ? 'sm' : 'lg'}
/>,
<ClearQueueEntries queueEntries={filteredQueueEntries} />,
]}
tableFilters={
<>
<QueueDropdownFilter /> <StatusDropdownFilter />
<TableToolbarSearch
className={styles.search}
onChange={(e) => setSearchTerm(e.target.value)}
placeholder={t('searchThisList', 'Search this list')}
size={isDesktop(layout) ? 'sm' : 'lg'}
/>
<ClearQueueEntries queueEntries={filteredQueueEntries} />
</>
}
/>
</div>
) : (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ interface QueueTableProps {
ExpandedRow?: FC<{ queueEntry: QueueEntry }>;

// if provided, adds addition table toolbar elements
tableFilters?: React.ReactNode[];
tableFilters?: React.ReactNode;

isLoading?: boolean;
}
Expand Down Expand Up @@ -113,11 +113,7 @@ function QueueTable({

{tableFilters && (
<TableToolbar {...getToolbarProps()}>
<TableToolbarContent className={styles.toolbarContent}>
{tableFilters.map((tableFilter, index) => (
<React.Fragment key={index}>{tableFilter}</React.Fragment>
))}
</TableToolbarContent>
<TableToolbarContent className={styles.toolbarContent}>{tableFilters}</TableToolbarContent>
</TableToolbar>
)}
</div>
Expand Down

0 comments on commit 88af7f7

Please sign in to comment.