export const columns: ColumnDef<Issue>[] = [
/* ..other columns */
{
accessorKey: 'status',
header: 'Status',
filterFn: filterFn('option'),
meta: {
displayName: 'Status',
type: 'option',
icon: CircleDotDashedIcon,
options: issueStatuses.map((x) => ({ ...x, label: x.name })),
},
}
]
export type Issue = {
id: string
title: string
description?: string
status: IssueStatus
assignee?: User
labels?: IssueLabel[]
startDate?: Date
endDate?: Date
estimatedHours?: number
}
type FilterOperatorDetailsBase<OperatorValue, T extends ColumnDataType> = {
/* The operator value. Usually the string representation of the operator. */
value: OperatorValue
/* The label for the operator, to show in the UI. */
label: string
/* How much data the operator applies to. */
target: 'single' | 'multiple'
/* The plural form of the operator, if applicable. */
singularOf?: FilterOperators[T]
/* The singular form of the operator, if applicable. */
pluralOf?: FilterOperators[T]
/* All related operators. Normally, all the operators which share the same target. */
relativeOf: FilterOperators[T] | Array<FilterOperators[T]>
/* Whether the operator is negated. */
isNegated: boolean
/* If the operator is not negated, this provides the negated equivalent. */
negation?: FilterOperators[T]
/* If the operator is negated, this provides the positive equivalent. */
negationOf?: FilterOperators[T]
}