diff --git a/web/default/src/components/data-table/toolbar/toolbar.tsx b/web/default/src/components/data-table/toolbar/toolbar.tsx index cca09364..636ee94c 100644 --- a/web/default/src/components/data-table/toolbar/toolbar.tsx +++ b/web/default/src/components/data-table/toolbar/toolbar.tsx @@ -18,7 +18,7 @@ For commercial licensing, please contact support@quantumnous.com */ import * as React from 'react' import { useState, type ReactNode } from 'react' -import { type Table } from '@tanstack/react-table' +import type { Table } from '@tanstack/react-table' import { useDebounce } from '@/hooks' import { ChevronDown, Loader2, X as Cross2Icon } from 'lucide-react' import { useTranslation } from 'react-i18next' @@ -76,6 +76,11 @@ export type DataTableToolbarProps = { * search input and filter chips. */ additionalSearch?: ReactNode + /** + * Extra controls displayed immediately after the filter chips, before the + * right-aligned action cluster. + */ + afterFilters?: ReactNode /** * Whether non-table filters (e.g. `additionalSearch` or `expandable` * inputs) are currently active. Controls Reset button visibility @@ -282,20 +287,25 @@ export function DataTableToolbar(props: DataTableToolbarProps) { // Reset: outline text-only for form mode (always visible, disabled when // nothing to reset); ghost text + X for filter-as-you-type mode (only // visible when active filters exist). - const resetButton = hasSearch ? ( - - ) : isFiltered ? ( - - ) : null + let resetButton: ReactNode = null + if (hasSearch) { + resetButton = ( + + ) + } else if (isFiltered) { + resetButton = ( + + ) + } const searchButton = hasSearch ? (