revogrid icon indicating copy to clipboard operation
revogrid copied to clipboard

document the cell renderer in more detail

Open martindemello opened this issue 2 years ago • 3 comments

It would be helpful if the cell renderer documentation included some more details about the callback function, something along the lines of:

The props argument provides access to the column, row, and cell properties. See ColumnDataSchemaModel in the interface file for details of the data provided.

martindemello avatar Oct 25 '21 00:10 martindemello

Hi @martindemello

props is Object has:

  • column: column property like size, filter, sort, pin, drag, read only, column name, column logic name, cellTemplate, cellProperties...
  • data: grid data source
  • model: row data ( data[index] )
  • prop: column logic name
  • rowIndex: row index

please reading it in debug mode on chrome:

image

van-huyen avatar Jan 07 '22 01:01 van-huyen

hi @van-huyen , i figured it out by reading through the code, my point is that i should not have had to resort to that (or to looking up the chrome debugger), it should have been in the documentation.

martindemello avatar Jan 07 '22 01:01 martindemello

I agree. Currently, the documents explain only about 30%. Maybe the development team doesn't seem to have time.

van-huyen avatar Jan 07 '22 01:01 van-huyen