dolfindevelopers

Bills filters

ComponentPayablesSDK + UI

Queue tabs and a state multi-select that always agree, a supplier multi-select searched on the server, invoice number, PO number and tag filters, a due date range, and the duplicates and match toggles. Driven by useBillFilters.

Component: A piece you place inside your own screens: a table, a form, a card or a dialog. You decide the layout around it. Pages vs components

Choose your integration

Ready to connect to Dolfin. Loads data through SDK hooks, with appearance and behaviour you can customise. Requires DolfinProvider.

Loading preview…

Installation

Needs the Dolfin registry token. The CLI copies the source into your app.

Terminal
bunx --bun shadcn@4.23.0 add @dolfin/ap-bills-filters

Also installs: badge, button, command, input, popover, switch, tabs, base-theme, base-info-hint, base-states, ui-ap-bills-filters.

Usage

screen.tsx
import { ApBillsFilters } from "@/components/dolfin/ap/bills-filters";

// Place it anywhere inside your <DolfinProvider>.
<ApBillsFilters filters={filters} />

Renders inside DolfinProvider (set it up once). By default it loads its own data through the SDK. Supplied-data examples show how to override that behavior.

API reference

PropTypeDescription
filters requiredBillListFiltersThe filters as typed (pass them to `ApBillsTable` or `useBills`, which debounce the text ones).
onFiltersChange(filters: BillListFilters) => voidCalled with the next filters on every change.
suppliersreadonly MultiSelectOption[]Suppliers for the supplier filter. Given, nothing is fetched; otherwise it searches your suppliers.
hidereadonly ApBillsFilterControl[]Controls to leave out, e.g. `["suppliers"]` on a supplier's own page.
childrenstring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…Extra controls at the end of the text filter row.
classNamestring

Customisation

Without editing the source, you can change:

Class names
className
Messages
ap.billsbase.infoHint.moreAboutbase.statescore.errors

Or edit the installed file directly: it is your code. See theming for colours and fonts.

Hooks

The SDK hooks this component uses. Use them directly from @dolfinai/react to build your own version.

useBillSupplierOptionsuseMessages

Files

Written to your app by the install command:

  • components/dolfin/ap/bills-filters.tsx 148 lines
  • components/dolfin/ap/bill-multi-select.tsx 209 lines