Skip to content

DataTable/Column/filterFunction: event is literally 0 #8479

@simeonborko

Description

@simeonborko

Hello, in our team we have a table where the data for one field are stored outside of row objects. The table is quite big, and this is the only column which is editable so we chose this approach.

<DataTable
  cellMemo={false}
  /* ... */
>
  <Column body={row => getData(row)}/>
  /* ... */
</DataTable>

We'd like to add filtering for the column using filterFunction. According to TypeScript types, the fourth parameter should be ColumnFilterEvent.

// in ColumnProps
filterFunction?(value: any, filter: any, filterLocale: string, params: ColumnFilterEvent): void;

In the ColumnFilterEvent, there should be rowData which we need to access so that we are able to derive the actual value for the column, similarly as we do in the body function.

However, the fourth parameter is literally 0 (zero as a number).

Versions:

  • React 19.2.3
  • PrimeReact 10.9.7

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: Needs TriageIssue will be reviewed by Core Team and a relevant label will be added as soon as possible

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions