Author Topic: New simple feature requet  (Read 279 times)

jplevene

  • Pro Ultimate
  • Full Member
  • *
  • Posts: 131
    • View Profile
New simple feature requet
« on: March 26, 2024, 08:49:26 pm »
In the filter in the colModel, for compare, add the ui or rowData parameter so that we can use the rowData, as sometimes a cell is rendered or formatted to include data from other columns or data.

Code: [Select]
        //override range compare function.
        conditions: {
            range:{
                //override compare property of range condition.
                compare: (cellData, value, value2, ui) => boolean
            }
        }

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6308
    • View Profile
Re: New simple feature requet
« Reply #1 on: March 27, 2024, 10:50:35 pm »
Fourth argument is actually rowData

Code: [Select]
compare: ( cellData, value, value2, rowData )

but defining dependencies between columns multiple times in column.render and filter.compare callbacks is not a good design

It's a good practice to define dependencies between columns at a single place using rowTemplate or column formulas. There are couple of examples for that in the demos section.
« Last Edit: March 28, 2024, 05:54:36 pm by paramvir »