Framework stability fixes.

pull/58/head
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,
};
export function getFieldMetaData(field, schema, value, viewHelperProps) {
export function getFieldMetaData(field, schema, value, viewHelperProps, onlyModeCheck=false) {
let retData = {
readonly: false,
disabled: false,
@ -89,6 +89,10 @@ export function getFieldMetaData(field, schema, value, viewHelperProps) {
return retData;
}
if(onlyModeCheck) {
return retData;
}
let {visible, disabled, readonly} = field;
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 */
const parseChanges = (schema, accessPath, changedData)=>{
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) {
return;
}

View File

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