Fixed an issue for sort and null controls for the Index node. Fixes #6791
parent
dc8ab7cd2a
commit
15ecf5d821
|
@ -82,8 +82,8 @@ export class ColumnSchema extends BaseUISchema {
|
||||||
id: 'colname', label: gettext('Column'),
|
id: 'colname', label: gettext('Column'),
|
||||||
type: 'select', cell: 'select', noEmpty: true,
|
type: 'select', cell: 'select', noEmpty: true,
|
||||||
disabled: () => inSchema(columnSchemaObj.node_info),
|
disabled: () => inSchema(columnSchemaObj.node_info),
|
||||||
readonly: function (state) {
|
editable: function (state) {
|
||||||
return columnSchemaObj.inSchemaWithModelCheck(state);
|
return !columnSchemaObj.inSchemaWithModelCheck(state);
|
||||||
},
|
},
|
||||||
options: columnSchemaObj.fieldOptions.columnList,
|
options: columnSchemaObj.fieldOptions.columnList,
|
||||||
node: 'column',
|
node: 'column',
|
||||||
|
@ -92,8 +92,8 @@ export class ColumnSchema extends BaseUISchema {
|
||||||
type: 'select',
|
type: 'select',
|
||||||
cell: 'select',
|
cell: 'select',
|
||||||
disabled: () => inSchema(columnSchemaObj.node_info),
|
disabled: () => inSchema(columnSchemaObj.node_info),
|
||||||
readonly: function (state) {
|
editable: function (state) {
|
||||||
return columnSchemaObj.inSchemaWithModelCheck(state);
|
return !columnSchemaObj.inSchemaWithModelCheck(state);
|
||||||
},
|
},
|
||||||
options: columnSchemaObj.fieldOptions.collationList,
|
options: columnSchemaObj.fieldOptions.collationList,
|
||||||
node: 'index',
|
node: 'index',
|
||||||
|
@ -129,16 +129,23 @@ export class ColumnSchema extends BaseUISchema {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
readonly: function (state) {
|
editable: function (state) {
|
||||||
return columnSchemaObj.inSchemaWithModelCheck(state);
|
return !columnSchemaObj.inSchemaWithModelCheck(state);
|
||||||
},
|
},
|
||||||
node: 'index',
|
node: 'index',
|
||||||
url_jump_after_node: 'schema',
|
url_jump_after_node: 'schema',
|
||||||
deps: ['amname'],
|
deps: ['amname'],
|
||||||
},{
|
},{
|
||||||
id: 'sort_order', label: gettext('Sort order'),
|
id: 'sort_order', label: gettext('Sort order'),
|
||||||
type: 'switch',
|
type: 'select', cell: 'select',
|
||||||
cell: 'switch',
|
options: [
|
||||||
|
{label: 'ASC', value: false},
|
||||||
|
{label: 'DESC', value: true},
|
||||||
|
],
|
||||||
|
width: 110, disableResizing: true,
|
||||||
|
controlProps: {
|
||||||
|
allowClear: false,
|
||||||
|
},
|
||||||
depChange: (state, source, topState, actionObj) => {
|
depChange: (state, source, topState, actionObj) => {
|
||||||
//Access method is empty or btree then do not disable field
|
//Access method is empty or btree then do not disable field
|
||||||
if(isEmptyString(topState.amname) || topState.amname === 'btree') {
|
if(isEmptyString(topState.amname) || topState.amname === 'btree') {
|
||||||
|
@ -167,13 +174,8 @@ export class ColumnSchema extends BaseUISchema {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
deps: ['amname'],
|
deps: ['amname'],
|
||||||
options: {
|
|
||||||
'onText': 'DESC', 'offText': 'ASC',
|
|
||||||
},
|
|
||||||
},{
|
},{
|
||||||
id: 'nulls', label: gettext('NULLs'),
|
id: 'nulls', label: gettext('NULLs'),
|
||||||
type: 'switch',
|
|
||||||
cell: 'switch',
|
|
||||||
editable: function(state) {
|
editable: function(state) {
|
||||||
let topObj = columnSchemaObj._top;
|
let topObj = columnSchemaObj._top;
|
||||||
if(columnSchemaObj.inSchemaWithModelCheck(state)) {
|
if(columnSchemaObj.inSchemaWithModelCheck(state)) {
|
||||||
|
@ -187,9 +189,12 @@ export class ColumnSchema extends BaseUISchema {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
deps: ['amname', 'sort_order'],
|
deps: ['amname', 'sort_order'],
|
||||||
options: {
|
type:'select', cell: 'select',
|
||||||
'onText': 'FIRST', 'offText': 'LAST',
|
options: [
|
||||||
},
|
{label: 'FIRST', value: true},
|
||||||
|
{label: 'LAST', value: false},
|
||||||
|
], controlProps: {allowClear: false},
|
||||||
|
width: 110, disableResizing: true,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue