Skip to content

Column props with access to rowData #112

@stychu

Description

@stychu

Would it be possible to change some of the column configuration properties from primitive value types to function types with access to the rowData??

https://github.com/NadavShaar/react-grid-table#columns

Im especially interested in the editable property for the column.
Having it as a boolean type makes it as fixed global configuration. If it could be defined as the getValue for example It could be set dynamically based on the row.

editable: ({rowData,column}) => boolean

This way I could have some rows that could have all required columns to be editable and some rows that can have mixed columns to be only editable and rest of them not editable. I can achieve this via editorCellRenderer checking inside it if the given data property allows the cell to be editable but I believe editable property on configuration would be more accurate for this and reduce code complexity of editorCellRenderer component

This could be considered for other column configuration properties too I believe.

Would this be possible to do ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions