mirror of
https://github.com/Fabio286/antares.git
synced 2025-06-05 21:59:22 +02:00
fix(UI): data type not listed in selection if not present in global types
This commit is contained in:
@ -80,6 +80,9 @@
|
||||
<option v-if="localOptions.returns === 'VOID'">
|
||||
VOID
|
||||
</option>
|
||||
<option v-if="!isInDataTypes">
|
||||
{{ localOptions.returns }}
|
||||
</option>
|
||||
<optgroup
|
||||
v-for="group in workspace.dataTypes"
|
||||
:key="group.group"
|
||||
@ -178,6 +181,21 @@ export default {
|
||||
},
|
||||
customizations () {
|
||||
return this.workspace.customizations;
|
||||
},
|
||||
isInDataTypes () {
|
||||
let typeNames = [];
|
||||
for (const group of this.workspace.dataTypes) {
|
||||
const groupTypeNames = group.types.reduce((acc, curr) => {
|
||||
acc.push(curr.name);
|
||||
return acc;
|
||||
}, []);
|
||||
|
||||
typeNames = [
|
||||
...groupTypeNames,
|
||||
...typeNames
|
||||
];
|
||||
}
|
||||
return typeNames.includes(this.localOptions.returns);
|
||||
}
|
||||
},
|
||||
created () {
|
||||
|
Reference in New Issue
Block a user