- Fix Jasmine test cases failing in framework. - More stability fixes and enhancements.

This commit is contained in:
Aditya Toshniwal
2021-09-09 13:03:54 +05:30
committed by Akshay Joshi
parent 351cb3e6ca
commit 9274df0f11
6 changed files with 18 additions and 12 deletions
@@ -322,7 +322,7 @@ export default function DataGridView({
return props.columns.indexOf(firstF.id) < props.columns.indexOf(secondF.id) ? -1 : 1;
}
return 0;
}).map((field)=>{
}).map((field, fieldIdx)=>{
let colInfo = {
Header: field.label||<>&nbsp;</>,
accessor: field.id,
@@ -332,6 +332,9 @@ export default function DataGridView({
...(field.minWidth ? {minWidth: field.minWidth} : {}),
...(field.width ? {width: field.width} : {}),
Cell: ({value, row, ...other}) => {
/* Make sure to take the latest field info from schema */
field = schemaRef.current.fields[fieldIdx];
let {visible, editable, readonly, ..._field} = field;
let verInLimit = (_.isUndefined(viewHelperProps.serverInfo) ? true :
@@ -123,12 +123,12 @@ export default class BaseUISchema {
getNewData(data={}) {
let newRow = {};
this.fields.forEach((field)=>{
if(!_.isUndefined(data[field.id])){
newRow[field.id] = data[field.id];
} else {
newRow[field.id] = this.defaults[field.id];
}
newRow[field.id] = this.defaults[field.id];
});
newRow = {
...newRow,
...data,
};
return newRow;
}
+3 -2
View File
@@ -764,8 +764,9 @@ function SchemaPropertiesView({
accessPath={[]}
formErr={{}}
controlClassName={classes.controlRow}
{...field}
visible={visible}
{...field} />
/>
);
} else if(field.type === 'collection') {
tabs[group].push(
@@ -792,10 +793,10 @@ function SchemaPropertiesView({
state={origData}
name={field.id}
value={origData[field.id]}
{...field}
readonly={readonly}
disabled={disabled}
visible={visible}
{...field}
className={classes.controlRow}
/>
);