st: refactor: editable: false 항목 cell 스타일 적용 방식 수정
This commit is contained in:
@@ -1171,7 +1171,7 @@ const DataGrid = ({
|
||||
const gv = gridRef.current?.gridView;
|
||||
if (!gv?.columnByName) return;
|
||||
columns.forEach((column) => {
|
||||
const baseStyleName = column.styleName ?? (column.editable === false ? 'rg-cell-readonly' : undefined);
|
||||
const baseStyleName = column.styleName;
|
||||
const gridCol = gv.columnByName(column.name) as { styleCallback?: (g: unknown, dataCell: { itemIndex?: number; index?: { itemIndex?: number }; dataField?: string; fieldName?: string }) => string } | null;
|
||||
if (gridCol) {
|
||||
gridCol.styleCallback = (_g, dataCell) => {
|
||||
@@ -1191,12 +1191,7 @@ const DataGrid = ({
|
||||
}}
|
||||
>
|
||||
{columns.map((column) => {
|
||||
const baseStyleName =
|
||||
column.styleName != null
|
||||
? column.styleName
|
||||
: column.editable === false
|
||||
? ('rg-cell-readonly' as const)
|
||||
: undefined;
|
||||
const baseStyleName = column.styleName;
|
||||
|
||||
return (
|
||||
<RGDataColumn
|
||||
|
||||
Reference in New Issue
Block a user