Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/primefaces/primevue
Browse files Browse the repository at this point in the history
  • Loading branch information
cagataycivici committed Sep 9, 2024
2 parents 55d4889 + 627a932 commit 259369f
Showing 1 changed file with 16 additions and 18 deletions.
34 changes: 16 additions & 18 deletions apps/showcase/doc/popover/DataTableDoc.vue
Original file line number Diff line number Diff line change
Expand Up @@ -180,17 +180,16 @@ export default {
},
methods: {
displayProduct(event, product) {
this.$refs.op.hide();
if (this.selectedProduct?.id === product.id) {
this.$refs.op.hide();
this.selectedProduct = null;
} else {
this.selectedProduct = product;
this.$refs.op.show(event);
// will not be needed with v4.0.6 as Popover will auto align
if (this.$refs.op.container) {
this.$refs.op.alignOverlay();
}
this.$nextTick(() => {
this.$refs.op.show(event);
});
}
},
hidePopover() {
Expand Down Expand Up @@ -269,7 +268,7 @@ export default {
</template>
<script setup>
import { ref, onMounted } from "vue";
import { ref, onMounted, nextTick } from "vue";
import { useToast } from "primevue/usetoast";
import { ProductService } from '@/service/ProductService';
Expand All @@ -282,17 +281,16 @@ const products = ref();
const selectedProduct = ref();
const displayProduct = (event, product) => {
op.value.hide();
if (selectedProduct.value?.id === product.id) {
op.value.hide();
selectedProduct.value = null;
} else {
selectedProduct.value = product;
op.value.show(event);
// will not be needed with v4.0.6 as Popover will auto align
if (op.value.container) {
op.value.alignOverlay();
}
nextTick(() => {
op.value.show(event);
});
}
}
Expand Down Expand Up @@ -341,16 +339,16 @@ const getSeverity = (product) => {
},
methods: {
displayProduct(event, product) {
this.$refs.op.hide();
if (this.selectedProduct?.id === product.id) {
this.$refs.op.hide();
this.selectedProduct = null;
} else {
this.selectedProduct = product;
this.$refs.op.show(event);
if (this.$refs.op.container) {
this.$refs.op.alignOverlay();
}
this.$nextTick(() => {
this.$refs.op.show(event);
});
}
},
hidePopover() {
Expand Down

0 comments on commit 259369f

Please sign in to comment.