11<script setup lang="ts">
2- import { ColDef , GridOptions } from ' ag-grid-enterprise' ;
2+ import { type ColDef , type GridOptions } from ' ag-grid-enterprise' ;
33import { AgGridVue } from ' ag-grid-vue3' ;
44import { AgGridTheme , PlAgOverlayLoading , PlAgOverlayNoRows , PlBlockPage , PlBtnGhost , PlMaskIcon24 , PlSlideModal } from ' @platforma-sdk/ui-vue' ;
55import { refDebounced } from ' @vueuse/core' ;
6- import { reactive , } from ' vue' ;
6+ import { reactive , watch , ref } from ' vue' ;
77import { useApp } from ' ../app' ;
88import { TreeResult , TreeResultsFull } from ' ../results' ;
99import ProgressCell from ' ./components/ProgressCell.vue' ;
@@ -69,10 +69,6 @@ const columnDefs: ColDef<TreeResult>[] = [
6969 }
7070];
7171
72- // watch(result, rd => {
73- // console.dir(rd, { depth: 5 })
74- // }, { immediate: true })
75-
7672const gridOptions: GridOptions <TreeResult > = {
7773 getRowId : (row ) => String (row .data .donor ),
7874 onRowDoubleClicked : (e ) => {
@@ -84,6 +80,13 @@ const gridOptions: GridOptions<TreeResult> = {
8480 }
8581};
8682
83+ const reloadKey = ref (0 );
84+ watch (
85+ () => model .outputs .calculating ,
86+ () => {
87+ ++ reloadKey .value ;
88+ },
89+ { immediate: true });
8790 </script >
8891
8992<template >
@@ -98,10 +101,19 @@ const gridOptions: GridOptions<TreeResult> = {
98101 </template >
99102
100103 <div :style =" { flex: 1 }" >
101- <AgGridVue :theme =" AgGridTheme" :style =" { height: '100%' }" :rowData =" result" :defaultColDef =" defaultColDef"
102- :columnDefs =" columnDefs" :grid-options =" gridOptions" :loadingOverlayComponentParams =" { notReady: true, message: `Configure the settings and click
103- 'Run' to see the data` }"
104- :loadingOverlayComponent =PlAgOverlayLoading :noRowsOverlayComponent =PlAgOverlayNoRows />
104+ <AgGridVue
105+ :theme =" AgGridTheme"
106+ :style =" { height: '100%' }"
107+ :rowData =" result"
108+ :defaultColDef =" defaultColDef"
109+ :columnDefs =" columnDefs"
110+ :grid-options =" gridOptions"
111+ :loadingOverlayComponentParams =" { notReady: !model.outputs.calculating, message: `Configure the settings and click
112+ 'Run' to see the data` }"
113+ :loadingOverlayComponent =PlAgOverlayLoading
114+ :noRowsOverlayComponent =PlAgOverlayNoRows
115+ :key =" reloadKey"
116+ />
105117 </div >
106118
107119 <PlSlideModal v-model =" data.settingsOpen" >
0 commit comments