mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed issue where modified SQL not loading Unique Constraint dialog. Fixes #6772
This commit is contained in:
parent
9179b7464b
commit
0e6794f2f5
@ -115,13 +115,14 @@ export default class UniqueConstraintSchema extends BaseUISchema {
|
|||||||
allowClear:false,
|
allowClear:false,
|
||||||
multiple: true,
|
multiple: true,
|
||||||
formatter: {
|
formatter: {
|
||||||
fromRaw: (backendVal)=>{
|
fromRaw: (backendVal, allOptions)=>{
|
||||||
/* remove the column key and pass as array */
|
/* remove the column key and pass as array */
|
||||||
return (backendVal||[]).map((singleVal)=>singleVal.column);
|
let optValues = (backendVal||[]).map((singleVal)=>singleVal.column);
|
||||||
|
return _.filter(allOptions, (opt)=>optValues.indexOf(opt.value)>-1);
|
||||||
},
|
},
|
||||||
toRaw: (value)=>{
|
toRaw: (value)=>{
|
||||||
/* take the array and convert to column key collection */
|
/* take the array and convert to column key collection */
|
||||||
return (value||[]).map((singleVal)=>({column: singleVal}));
|
return (value||[]).map((singleVal)=>({column: singleVal.value}));
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user