Skip to content

Commit

Permalink
chore: add selectedItems variable, so I can reach that when the objec…
Browse files Browse the repository at this point in the history
…ts are actually being removed #356
  • Loading branch information
bsilkyn committed May 14, 2024
1 parent 7ec839f commit 44fd23d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions frontend/src/views/admin/DockerImagesView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ const editItem = ref<DockerImage>(DockerImage.blankDockerImage());
const addItem = ref<DockerImage>(DockerImage.blankDockerImage());
const selectOptions = ref(['admin.list', 'admin.add']);
const selected = ref<string>(t(selectOptions.value[0]));
const selectedOption = ref<string>(t(selectOptions.value[0]));
const multiRemove = ref<boolean>(false);
const selectedItems = ref<any[] | null>(null);
const columns = ref([
{ field: 'id', header: 'admin.id' },
Expand Down Expand Up @@ -86,6 +87,7 @@ const removeItem = async (): Promise<void> => {
const onSelect = (selected: any[] | null): void => {
multiRemove.value = (selected?.length === undefined || selected?.length === 0) ?? false;
selectedItems.value = selected;
};
</script>

Expand All @@ -95,8 +97,8 @@ const onSelect = (selected: any[] | null): void => {
<div class="gap-3 mb-3">{{ t('admin.docker_images.title') }}</div>
</Title>
<Body class="w-full">
<SelectButton class="mb-3 gap-3 w-3" v-model="selected" :options="selectOptions.map(t)" />
<div v-if="selected === t(selectOptions[0])">
<SelectButton class="mb-3 gap-3 w-3" v-model="selectedOption" :options="selectOptions.map(t)" />
<div v-if="selectedOption === t(selectOptions[0])">
<LazyDataTable
:pagination="pagination"
:entities="dockerImages"
Expand Down

0 comments on commit 44fd23d

Please sign in to comment.