Skip to content

Commit

Permalink
docs(changeset): Fix missing cell.id
Browse files Browse the repository at this point in the history
  • Loading branch information
apuntovanini committed Apr 13, 2023
1 parent 05e092f commit 28796e3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/green-paws-sleep.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@uidu/data-fields': minor
---

Fix missing cell.id
4 changes: 2 additions & 2 deletions packages/data/data-fields/src/fields/rating/Cell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ import EditableCell from './EditableCell';
import { StyledRating } from './utils';

function Cell(props: CellContext<any, number>) {
const { getValue, column, cell } = props;
const { getValue, column } = props;
const value = getValue() || 0;

const max = column.columnDef?.meta?.max || 5;

if (column?.columnDef.meta.enableEditing) {
// eslint-disable-next-line react/jsx-props-no-spreading
return <EditableCell key={cell.id} {...props} />;
return <EditableCell {...props} />;
}

return (
Expand Down
6 changes: 3 additions & 3 deletions packages/data/data-fields/src/fields/singleSelect/Cell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ import EditableCell from './EditableCell';
import { ValueRenderer } from './utils';

function Cell(props: CellContext<any, string>) {
const { column, cell } = props;
const { column } = props;
// if (params.row.isGrouped) {
// return groupRenderer(params);
// }
if (column?.columnDef?.meta?.enableEditing) {
// eslint-disable-next-line react/jsx-props-no-spreading
return <EditableCell key={cell.id} {...props} />;
return <EditableCell {...props} />;
}

// eslint-disable-next-line react/jsx-props-no-spreading
return <ValueRenderer key={cell.id} {...props} />;
return <ValueRenderer {...props} />;
}

export default memo(Cell);

0 comments on commit 28796e3

Please sign in to comment.