Merge pull request #6902 from nextcloud/update-card-move-dialog

Clear selected stack when selected board changed
This commit is contained in:
Luka Trovic
2025-04-15 18:33:07 +02:00
committed by GitHub
2 changed files with 13 additions and 0 deletions

View File

@@ -374,6 +374,9 @@ describe('Card', function () {
cy.get('.app-sidebar-header .action-item__menutoggle').click()
cy.get('.v-popper__popper button:contains("Move/copy card")').click()
cy.get('.vs__dropdown-menu span[title="MyTestBoard"]').should('be.visible').click()
cy.get('[data-cy="select-stack"] .vs__dropdown-toggle').should('be.visible').click()
cy.get('.vs__dropdown-menu span[title="TestList"]').should('be.visible').click()
cy.get('.modal-container button:contains("Copy card")').click()
cy.wait('@clone', { timeout: 7000 })
cy.get('.card:contains("Hello world")').should('have.length', 2)

View File

@@ -18,6 +18,7 @@
:input-label="t('deck', 'Select a list')"
:options="stacksFromBoard"
:max-height="100"
data-cy="select-stack"
label="title" />
</div>
<template #actions>
@@ -59,6 +60,15 @@ export default {
return !(this.selectedBoard === '' || this.selectedStack === '')
},
},
watch: {
selectedBoard: {
immediate: true,
handler() {
this.selectedStack = ''
this.stacksFromBoard = []
},
},
},
mounted() {
subscribe('deck:card:show-move-dialog', this.openModal)
},