Fieldset changes should be included. Fix linter errors.

This commit is contained in:
Aditya Toshniwal authored and Akshay Joshi committed 2021-09-09 12:54:25 +05:30
1 parent cd9e37bac5
commit 51c11a21fa
2 files changed
+11 -10

No files matched your search

@@ -199,15 +199,8 @@ export default function DataGridView({
let columns = useMemo( let columns = useMemo(
()=>{ ()=>{
let cols = []; let cols = [];
let colInfo = {
Cell: ()=>{},
};
colInfo.Cell.displayName = 'Cell',
colInfo.Cell.propTypes = {
row: PropTypes.object.isRequired,
};
if(props.canEdit) { if(props.canEdit) {
colInfo = { let colInfo = {
Header: <>&nbsp;</>, Header: <>&nbsp;</>,
id: 'btn-edit', id: 'btn-edit',
accessor: ()=>{}, accessor: ()=>{},
@@ -228,10 +221,14 @@ export default function DataGridView({
/>; />;
} }
}; };
colInfo.Cell.displayName = 'Cell',
colInfo.Cell.propTypes = {
row: PropTypes.object.isRequired,
};
cols.push(colInfo); cols.push(colInfo);
} }
if(props.canDelete) { if(props.canDelete) {
colInfo = { let colInfo = {
Header: <>&nbsp;</>, Header: <>&nbsp;</>,
id: 'btn-delete', id: 'btn-delete',
accessor: ()=>{}, accessor: ()=>{},
@@ -261,6 +258,10 @@ export default function DataGridView({
); );
} }
}; };
colInfo.Cell.displayName = 'Cell',
colInfo.Cell.propTypes = {
row: PropTypes.object.isRequired,
};
cols.push(colInfo); cols.push(colInfo);
} }
+1 -1
View File
@@ -108,7 +108,7 @@ function getChangedData(topSchema, mode, sessData, stringify=false) {
/* Will be called recursively as data can be nested */ /* Will be called recursively as data can be nested */
const parseChanges = (schema, accessPath, changedData)=>{ const parseChanges = (schema, accessPath, changedData)=>{
schema.fields.forEach((field)=>{ schema.fields.forEach((field)=>{
if(field.type === 'nested-tab') { if((field.type||'').startsWith('nested-')) {
/* its nested */ /* its nested */
parseChanges(field.schema, accessPath, changedData); parseChanges(field.schema, accessPath, changedData);
} else { } else {