DataTable / TreeTable - How to style invalid cells?
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
Hi,
Sorry for the delayed response! You can do it using editor property of Column. Firstly, you can store the invalid keys in state. These keys can be row or column index or the unique option of data. Then, you can add a class after finding invalid data on editor template.
https://www.primefaces.org/primereact/s ... table/edit
Exp;
Best Regards,
Sorry for the delayed response! You can do it using editor property of Column. Firstly, you can store the invalid keys in state. These keys can be row or column index or the unique option of data. Then, you can add a class after finding invalid data on editor template.
https://www.primefaces.org/primereact/s ... table/edit
Exp;
Code: Select all
...
inputTextEditor(productKey, props, field) {
...
return <div className={`field_in_this.state.invalidKeys ? 'p-invalid-cell' : '' `}>
<InputText type="text" value={props.rowData[field]} onChange={(e) => this.onEditorValueChange(productKey, props, e.target.value)} />;
<div>
}
Github Profile: https://github.com/mertsincan
-
- Information
-
Who is online
Users browsing this forum: No registered users and 17 guests