@@ -84,6 +84,7 @@ const tableStep = ref(0);
84
84
const step = ref (0 );
85
85
const source = ref (null );
86
86
const tableUnit = ref (null );
87
+ const userOptionsRef = ref (null );
87
88
88
89
const FINAL_CONFIG = ref (prepareConfig ());
89
90
@@ -576,7 +577,15 @@ watch(() => mutableConfig.value.showTable, v => {
576
577
tableUnit .value .close ()
577
578
}
578
579
}
579
- })
580
+ });
581
+
582
+
583
+ function closeTable () {
584
+ mutableConfig .value .showTable = false ;
585
+ if (userOptionsRef .value ) {
586
+ userOptionsRef .value .setTableIconState (false );
587
+ }
588
+ }
580
589
581
590
defineExpose ({
582
591
getData,
@@ -619,21 +628,39 @@ defineExpose({
619
628
}" />
620
629
</div >
621
630
622
- <UserOptions ref =" details" :key =" `user_option_${step}`"
631
+ <UserOptions
632
+ ref =" userOptionsRef"
633
+ :key =" `user_option_${step}`"
623
634
v-if =" FINAL_CONFIG.userOptions.show && isDataset && (keepUserOptionState ? true : userOptionsVisible)"
624
- :backgroundColor =" FINAL_CONFIG.style.chart.backgroundColor" :color =" FINAL_CONFIG.style.chart.color"
625
- :isPrinting =" isPrinting" :isImaging =" isImaging" :uid =" uid" :hasTooltip =" false" :hasLabel =" false"
626
- :hasPdf =" FINAL_CONFIG.userOptions.buttons.pdf" :hasImg =" FINAL_CONFIG.userOptions.buttons.img"
627
- :hasXls =" FINAL_CONFIG.userOptions.buttons.csv" :hasTable =" FINAL_CONFIG.userOptions.buttons.table"
628
- :hasFullscreen =" FINAL_CONFIG.userOptions.buttons.fullscreen" :isFullscreen =" isFullscreen"
629
- :chartElement =" circlePackChart" :position =" FINAL_CONFIG.userOptions.position" :callbacks =" FINAL_CONFIG.userOptions.callbacks"
635
+ :backgroundColor =" FINAL_CONFIG.style.chart.backgroundColor"
636
+ :color =" FINAL_CONFIG.style.chart.color"
637
+ :isPrinting =" isPrinting"
638
+ :isImaging =" isImaging"
639
+ :uid =" uid"
640
+ :hasTooltip =" false"
641
+ :hasLabel =" false"
642
+ :hasPdf =" FINAL_CONFIG.userOptions.buttons.pdf"
643
+ :hasImg =" FINAL_CONFIG.userOptions.buttons.img"
644
+ :hasXls =" FINAL_CONFIG.userOptions.buttons.csv"
645
+ :hasTable =" FINAL_CONFIG.userOptions.buttons.table"
646
+ :hasFullscreen =" FINAL_CONFIG.userOptions.buttons.fullscreen"
647
+ :isFullscreen =" isFullscreen"
648
+ :chartElement =" circlePackChart"
649
+ :position =" FINAL_CONFIG.userOptions.position"
650
+ :callbacks =" FINAL_CONFIG.userOptions.callbacks"
630
651
:printScale =" FINAL_CONFIG.userOptions.print.scale"
631
652
:titles =" { ...FINAL_CONFIG.userOptions.buttonTitles }"
632
- :hasAnnotator =" FINAL_CONFIG.userOptions.buttons.annotator" :isAnnotation =" isAnnotator"
633
- @toggleFullscreen =" toggleFullscreen" @generatePdf =" generatePdf" @generateCsv =" generateCsv"
634
- @generateImage =" generateImage" @toggleTable =" toggleTable" @toggleAnnotator =" toggleAnnotator" :style =" {
635
- visibility: keepUserOptionState ? userOptionsVisible ? 'visible' : 'hidden' : 'visible'
636
- }" >
653
+ :hasAnnotator =" FINAL_CONFIG.userOptions.buttons.annotator"
654
+ :isAnnotation =" isAnnotator"
655
+ :tableDialog =" FINAL_CONFIG.table.useDialog"
656
+ @toggleFullscreen =" toggleFullscreen"
657
+ @generatePdf =" generatePdf"
658
+ @generateCsv =" generateCsv"
659
+ @generateImage =" generateImage"
660
+ @toggleTable =" toggleTable"
661
+ @toggleAnnotator =" toggleAnnotator"
662
+ :style =" { visibility: keepUserOptionState ? userOptionsVisible ? 'visible' : 'hidden' : 'visible' }"
663
+ >
637
664
<template #menuIcon =" { isOpen , color } " v-if =" $slots .menuIcon " >
638
665
<slot name =" menuIcon" v-bind =" { isOpen, color }" />
639
666
</template >
@@ -790,11 +817,11 @@ defineExpose({
790
817
</div >
791
818
792
819
<component
793
- v-if =" isDataset"
820
+ v-if =" isDataset && FINAL_CONFIG.userOptions.buttons.table "
794
821
:is =" tableComponent.component"
795
822
v-bind =" tableComponent.props"
796
823
ref =" tableUnit"
797
- @close =" mutableConfig.showTable = false "
824
+ @close =" closeTable "
798
825
>
799
826
<template #title v-if =" FINAL_CONFIG .table .useDialog " >
800
827
{{ tableComponent.title }}
@@ -813,7 +840,7 @@ defineExpose({
813
840
:config =" dataTable.config"
814
841
:title =" FINAL_CONFIG.table.useDialog ? '' : tableComponent.title"
815
842
:withCloseButton =" !FINAL_CONFIG.table.useDialog"
816
- @close =" mutableConfig.showTable = false "
843
+ @close =" closeTable "
817
844
>
818
845
<template #th =" { th } " >
819
846
<div v-html =" th" style =" display :flex ;align-items :center " ></div >
0 commit comments