mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-11-25 10:10:19 -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,
|
||||
multiple: true,
|
||||
formatter: {
|
||||
fromRaw: (backendVal)=>{
|
||||
fromRaw: (backendVal, allOptions)=>{
|
||||
/* 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)=>{
|
||||
/* 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