Fieldset changes should be included. Fix linter errors.

This commit is contained in:
Aditya Toshniwal 2021-07-20 12:48:54 +05:30 committed by Akshay Joshi
parent cd9e37bac5
commit 51c11a21fa
2 changed files with 11 additions and 10 deletions

View File

@ -199,15 +199,8 @@ export default function DataGridView({
let columns = useMemo(
()=>{
let cols = [];
let colInfo = {
Cell: ()=>{},
};
colInfo.Cell.displayName = 'Cell',
colInfo.Cell.propTypes = {
row: PropTypes.object.isRequired,
};
if(props.canEdit) {
colInfo = {
let colInfo = {
Header: <>&nbsp;</>,
id: 'btn-edit',
accessor: ()=>{},
@ -228,10 +221,14 @@ export default function DataGridView({
/>;
}
};
colInfo.Cell.displayName = 'Cell',
colInfo.Cell.propTypes = {
row: PropTypes.object.isRequired,
};
cols.push(colInfo);
}
if(props.canDelete) {
colInfo = {
let colInfo = {
Header: <>&nbsp;</>,
id: 'btn-delete',
accessor: ()=>{},
@ -261,6 +258,10 @@ export default function DataGridView({
);
}
};
colInfo.Cell.displayName = 'Cell',
colInfo.Cell.propTypes = {
row: PropTypes.object.isRequired,
};
cols.push(colInfo);
}

View File

@ -108,7 +108,7 @@ function getChangedData(topSchema, mode, sessData, stringify=false) {
/* Will be called recursively as data can be nested */
const parseChanges = (schema, accessPath, changedData)=>{
schema.fields.forEach((field)=>{
if(field.type === 'nested-tab') {
if((field.type||'').startsWith('nested-')) {
/* its nested */
parseChanges(field.schema, accessPath, changedData);
} else {