Skip to content

Commit

Permalink
Fixed some TS warning and fullIfCached (#3969)
Browse files Browse the repository at this point in the history
Co-authored-by: Ramin Haeri Azad <[email protected]>
  • Loading branch information
kazoompa and Ramin Haeri Azad authored Oct 27, 2024
1 parent 62e79ec commit acc23e6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 4 additions & 4 deletions opal-ui/src/components/datasource/VariableCategories.vue
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ const initialPagination = ref({
rowsPerPage: 20,
});
const selected = ref<CategoryDto[]>([]);
const selectedSingle = ref<CategoryDto>();
const selectedSingle = ref<CategoryDto>({ name: '', attributes: [], isMissing: false });
const toolsVisible = ref<{ [key: string]: boolean }>({});
const showDelete = ref(false);
const showEdit = ref(false);
Expand All @@ -153,7 +153,7 @@ const columns = computed(() => [
name: 'name',
required: true,
label: t('name'),
align: 'left',
align: 'left' as const,
field: 'name',
format: (val: string) => val,
sortable: true,
Expand All @@ -162,14 +162,14 @@ const columns = computed(() => [
name: 'label',
required: true,
label: t('label'),
align: 'left',
align: 'left' as const,
field: 'attributes',
},
{
name: 'missing',
required: true,
label: t('is_missing'),
align: 'left',
align: 'left' as const,
field: 'isMissing',
sortable: true,
},
Expand Down
4 changes: 3 additions & 1 deletion opal-ui/src/components/datasource/VariableSummary.vue
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,15 @@ watch([dsName, tName, () => props.variable], () => {
});
function init() {
const fullIfCached = !limit.value || limit.value >= props.total;
summary.value = {};
if (!props.variable || !props.variable.name) {
return;
}
loading.value = true;
datasourceStore
.loadVariableSummary(props.variable, true, limit.value > props.total ? props.total : limit.value)
.loadVariableSummary(props.variable, fullIfCached, limit.value > props.total ? props.total : limit.value)
.then((data) => {
summary.value = data;
})
Expand Down

0 comments on commit acc23e6

Please sign in to comment.