diff --git a/src/components/data/datagrid/datagridthead.tsx b/src/components/data/datagrid/datagridthead.tsx index 8e1e614..8be9002 100644 --- a/src/components/data/datagrid/datagridthead.tsx +++ b/src/components/data/datagrid/datagridthead.tsx @@ -163,7 +163,12 @@ export const DataGridTHead: React.FC = () => { {field.filterable !== false && ( } + icon={ + !field.options && + !field.type.includes("date") && ( + + ) + } form={`${dataGridId}-filter-form`} name={field.filterLookup || field.name} options={field.options} diff --git a/src/components/form/daterangeinput/daterangeinput.tsx b/src/components/form/daterangeinput/daterangeinput.tsx index 010b8a1..a34f829 100644 --- a/src/components/form/daterangeinput/daterangeinput.tsx +++ b/src/components/form/daterangeinput/daterangeinput.tsx @@ -8,6 +8,9 @@ import "./daterangeinput.scss"; import { TRANSLATIONS } from "./daterangeinput.translations"; export type DateRangeInputProps = Omit & { + /** Component to use as icon. */ + icon?: React.ReactNode; + /** Whether a date or date range should be provided. */ type?: "daterange"; @@ -26,6 +29,7 @@ export type DateRangeInputProps = Omit & { */ export const DateRangeInput: React.FC = ({ form, + icon = , labelStartDate, labelEndDate, name, @@ -204,7 +208,7 @@ export const DateRangeInput: React.FC = ({ value={valuesState?.[0]} onChange={handleStartChange} /> - {" "} + {icon}