fix: cell component types
Description
Closes #5923
The cell component prop types are incomplete because we are currently using Pick<> to add 'collection' | 'rowData' from the cell props, we should use Partial<> instead so any cell prop type can be accessed (but is not required).
- [X] I have read and understand the CONTRIBUTING.md document in this repository.
Type of change
- [X] Chore (non-breaking change which does not add functionality)
Checklist:
- [X] Existing test suite passes locally with my changes
When specifying a custom cell component in the Paylaod config, the component doesn't seem to receive props.data . Is props.data being used internally? If so, would it make sense to define two types, one for internal use, and one to be used by custom cell components provided in the config options? This is what the component currently receives:
{
"cellData": 6,
"colIndex": 6,
"collection": Object,
"field": Object,
"link": true,
"rowData": Object,
}
Also, why use Partial<Props>? Are there situations in which not all the props are provided?
Outdated