@@ -12,6 +12,7 @@ import Button from 'primevue/button';
1212import {FontAwesomeIcon } from ' @fortawesome/vue-fontawesome' ;
1313import {isSubSchemaDefinedInDefinitions } from ' @/schema/schemaReadingUtils' ;
1414import {getObjectDisplayName } from ' ../../../schema/graph-representation/schemaGraphConstructor' ;
15+ import {computed } from ' vue' ;
1516
1617const props = defineProps <{
1718 data: SchemaEnumNodeData ;
@@ -83,6 +84,16 @@ function addEnumItem() {
8384 enumValues .value .push (' NEW_ITEM' );
8485 emit (' update_enum_values' , props .data , enumValues .value );
8586}
87+
88+ const maxEnumValuesToShow = computed (() => settings .value .schemaDiagram .maxEnumValuesToShow );
89+
90+ const isEnumTruncated = computed (() => {
91+ if (! settings .value .schemaDiagram .showEnumValues ) {
92+ return false ;
93+ }
94+
95+ return props .data .values .length > maxEnumValuesToShow .value ;
96+ });
8697 </script >
8798
8899<template >
@@ -120,10 +131,12 @@ function addEnumItem() {
120131 <hr />
121132
122133 <div v-if =" settings.schemaDiagram.showEnumValues" v-for =" (value,index) in props.data!.values" >
123- <p v-if =" index < settings.schemaDiagram. maxEnumValuesToShow" >
134+ <p v-if =" index < maxEnumValuesToShow" >
124135 {{ value }}
125136 </p >
126137 </div >
138+
139+ <p v-if =" isEnumTruncated" class =" vue-flow-enum-ellipsis" >...</p >
127140 </div >
128141
129142 <div v-else >
@@ -203,6 +216,11 @@ function addEnumItem() {
203216 color : #536878 ;
204217 background : linear-gradient (135deg , #e9f5ff 0% , #ffffff 100% );
205218}
219+ .vue-flow-enum-ellipsis {
220+ font-style : italic ;
221+ opacity : 0.7 ;
222+ margin : 0 ;
223+ }
206224
207225.vue-flow__handle {
208226 border : none ;
0 commit comments