Relative Content

Tag Archive for typescriptreact-typescriptag-grid-reactcellrenderer

In react typescript, the cellRenderer is not working when it is in ternary operator

`const EditableCellRenderer: React.FC<any> = (props) => { console.log(“EditableCellRenderer working”) const { value } = props; const [cellValue, setCellValue] = useState(value); const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => { setCellValue(e.target.value); }; return ( <input type=”text” value={cellValue} onChange={handleChange} style={{ width: ‘100%’, height: ‘70%’, borderRadius: ‘0px’, border: ‘1px solid #D1D1D1’, padding: ‘3px’ }} /> ); }; const colDef: ColDef<RowData>[] […]