diff --git a/packages/ui/src/types.ts b/packages/ui/src/types.ts index aa0e5193..cffcb8aa 100644 --- a/packages/ui/src/types.ts +++ b/packages/ui/src/types.ts @@ -6,9 +6,9 @@ export type OPaths = OPathsWithOptional export type MUIParseLabel = (label: LabelType) => string export type MUIButton, Label extends string = string> = { - label: Label | ((info: { value: Value; data: T }) => Label) - handler: (info: { value: Value; data: T }) => void | Promise - disabled?: (info: { value: Value; data: T }) => boolean | undefined + label: Label | ((info: { value: any; data: T }) => Label) + handler: (info: { value: any; data: T }) => void | Promise + disabled?: (info: { value: any; data: T }) => boolean | undefined } export type MUIColumn, Label extends string = string> = { @@ -31,11 +31,11 @@ export type MUIColumn, Label extends string = stri * @example ({ value }) => !!value ? '✅' : '❌' * @example ({ data }) => data.name.family + ' ' + data.name.given */ - parseValue?: (info: { value: Value; data: T }) => string + parseValue?: (info: { value: any; data: T }) => string /** Applied to `td > div` */ - class?: string | ((info: { value: Value; data: T }) => string) + class?: string | ((info: { value: any; data: T }) => string) /** Applied to `td > div` */ - style?: string | ((info: { value: Value; data: T }) => string) + style?: string | ((info: { value: any; data: T }) => string) /** When `true` this column will become sortable as per the Magnetar orderBy feature */ sortable?: boolean | { orderBy: 'asc' | 'desc'; position: number } /** Shows action buttons next to the cell value */