Framework stability fixes.

This commit is contained in:
Aditya Toshniwal 2021-08-10 12:20:13 +05:30 committed by Akshay Joshi
parent 169d8fa480
commit 0ddd053e88
3 changed files with 9 additions and 3 deletions

View File

@ -71,7 +71,7 @@ SQLTab.propTypes = {
getSQLValue: PropTypes.func.isRequired, getSQLValue: PropTypes.func.isRequired,
}; };
export function getFieldMetaData(field, schema, value, viewHelperProps) { export function getFieldMetaData(field, schema, value, viewHelperProps, onlyModeCheck=false) {
let retData = { let retData = {
readonly: false, readonly: false,
disabled: false, disabled: false,
@ -89,6 +89,10 @@ export function getFieldMetaData(field, schema, value, viewHelperProps) {
return retData; return retData;
} }
if(onlyModeCheck) {
return retData;
}
let {visible, disabled, readonly} = field; let {visible, disabled, readonly} = field;
let verInLimit = (_.isUndefined(viewHelperProps.serverInfo) ? true : let verInLimit = (_.isUndefined(viewHelperProps.serverInfo) ? true :

View File

@ -136,7 +136,9 @@ function getChangedData(topSchema, viewHelperProps, 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)=>{
let {modeSupported} = getFieldMetaData(field, schema, {}, viewHelperProps); /* At this point the schema assignments like top may not have been done
So, only check the mode by passing true to getFieldMetaData */
let {modeSupported} = getFieldMetaData(field, schema, {}, viewHelperProps, true);
if(!modeSupported) { if(!modeSupported) {
return; return;
} }

View File

@ -73,7 +73,7 @@ export default function DataGridViewWithHeaderForm(props) {
</Box> </Box>
</Box>} </Box>}
</Box> </Box>
<DataGridView {...otherProps} canAdd={false}/> <DataGridView {...otherProps} label="" canAdd={false}/>
</Box> </Box>
); );
} }