@linzjs/step-ag-grid 29.8.0 → 29.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3452,17 +3452,22 @@ const GridCellRenderer = (props) => {
3452
3452
  const { checkUpdating } = useContext(GridUpdatingContext);
3453
3453
  const colDef = props.colDef;
3454
3454
  const rendererParams = colDef.cellRendererParams;
3455
+ const errorFn = rendererParams?.error;
3456
+ let errorText = props.data !== undefined && errorFn ? errorFn(props) : undefined;
3455
3457
  const warningFn = rendererParams?.warning;
3456
3458
  let warningText = props.data !== undefined && warningFn ? warningFn(props) : undefined;
3457
3459
  const infoFn = rendererParams?.info;
3458
3460
  let infoText = props.data !== undefined && infoFn ? infoFn(props) : undefined;
3461
+ if (Array.isArray(errorText)) {
3462
+ errorText = errorText.join('\n');
3463
+ }
3459
3464
  if (Array.isArray(warningText)) {
3460
3465
  warningText = warningText.join('\n');
3461
3466
  }
3462
3467
  if (Array.isArray(infoText)) {
3463
3468
  infoText = infoText.join('\n');
3464
3469
  }
3465
- return checkUpdating(colDef.field ?? colDef.colId ?? '', props.data.id) ? (jsx(GridLoadableCell, {})) : (jsxs(Fragment, { children: [!!warningText && (jsx(GridIcon, { icon: 'ic_warning_outline', title: typeof warningText === 'string' ? warningText : 'Warning' })), !!infoText && jsx(GridIcon, { icon: 'ic_info_outline', title: typeof infoText === 'string' ? infoText : 'Info' }), jsx("div", { className: 'GridCell-container', children: colDef.cellRendererParams?.originalCellRenderer ? (jsx(colDef.cellRendererParams.originalCellRenderer, { ...props })) : (jsx("span", { title: props.valueFormatted ?? undefined, children: props.valueFormatted || '–' })) }), fnOrVar(colDef.editable, props) && rendererParams?.rightHoverElement && (jsx("div", { className: 'GridCell-hoverRight', children: rendererParams?.rightHoverElement }))] }));
3470
+ return checkUpdating(colDef.field ?? colDef.colId ?? '', props.data.id) ? (jsx(GridLoadableCell, {})) : (jsxs(Fragment, { children: [!!errorText && (jsx(GridIcon, { icon: 'ic_error_outline', title: typeof errorText === 'string' ? errorText : 'Error' })), !!warningText && (jsx(GridIcon, { icon: 'ic_warning_outline', title: typeof warningText === 'string' ? warningText : 'Warning' })), !!infoText && jsx(GridIcon, { icon: 'ic_info_outline', title: typeof infoText === 'string' ? infoText : 'Info' }), jsx("div", { className: 'GridCell-container', children: colDef.cellRendererParams?.originalCellRenderer ? (jsx(colDef.cellRendererParams.originalCellRenderer, { ...props })) : (jsx("span", { title: props.valueFormatted ?? undefined, children: props.valueFormatted || '–' })) }), fnOrVar(colDef.editable, props) && rendererParams?.rightHoverElement && (jsx("div", { className: 'GridCell-hoverRight', children: rendererParams?.rightHoverElement }))] }));
3466
3471
  };
3467
3472
  const suppressCellKeyboardEvents = (e) => {
3468
3473
  const shortcutKeys = e.colDef.cellRendererParams?.shortcutKeys ?? {};