Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add resetValidation on Vinput #3863

Merged
merged 2 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions packages/synapse-bridge/dev/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { createVuetify } from 'vuetify'
import { aliases, mdi } from 'vuetify/iconsets/mdi-svg'
import { fr } from 'vuetify/locale'


import { colorTheme } from '@cnamts/design-tokens/src/colors'

import { notification } from '@/modules/notification'
Expand Down Expand Up @@ -36,7 +35,6 @@ const vuetify = createVuetify({
},
},
},

})

const store = createStore({
Expand Down
8 changes: 6 additions & 2 deletions packages/synapse-bridge/src/elements/DialogBox/DialogBox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export default defineComponent({
closeIcon: mdiClose,
locales,
dialog: this.modelValue,
titleId: `title-${Math.random().toString(36).substring(7)}`
titleId: `title-${Math.random().toString(36).substring(7)}`,
}
},

Expand Down Expand Up @@ -142,7 +142,11 @@ export default defineComponent({
>
<VCardTitle v-bind="options.cardTitle">
<slot name="title">
<h2 v-if="title" :id="titleId" class="text-h6 font-weight-bold">
<h2
v-if="title"
:id="titleId"
class="text-h6 font-weight-bold"
>
{{ title }}
</h2>
</slot>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ describe('DialogBox', () => {

await wrapper.vm.$nextTick()

const dialog = wrapper.findComponent(VDialog);
const title = wrapper.findComponent(VCard).find('h2').text();
const dialog = wrapper.findComponent(VDialog)
const title = wrapper.findComponent(VCard).find('h2').text()

expect(dialog.exists()).toBe(true);
expect(title).toBe('Test title');
expect(dialog.exists()).toBe(true)
expect(title).toBe('Test title')
})

it('is closed when model value is false', async () => {
Expand All @@ -52,9 +52,9 @@ describe('DialogBox', () => {

await wrapper.vm.$nextTick()

const card = wrapper.findComponent(VCard);
const card = wrapper.findComponent(VCard)

expect(card.exists()).toBe(false);
expect(card.exists()).toBe(false)
})

it('becomes visible when the model value is updated', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ export default defineComponent({
startDateFormatted() {
return this.startDate
? dayjs(this.startDate, 'YYYY-MM-DD').format(
this.dateFormatReturn
)
this.dateFormatReturn
)
: null
},
inputRules() {
Expand Down Expand Up @@ -189,7 +189,7 @@ export default defineComponent({
},
formSubmitted(newValue) {
if (newValue) {
this.updateMessages();
this.updateMessages()
}
},
},
Expand Down Expand Up @@ -235,7 +235,7 @@ export default defineComponent({
async updateMessages() {
const textField = this.$refs[
'text-field'
] as ComponentPublicInstance<typeof VTextField>
] as ComponentPublicInstance<typeof VTextField>
if (!textField) return

this.validateWarning(this.internalValue)
Expand Down
Loading
Loading