Skip to content

Commit 27c3f94

Browse files
committed
fix(Knob): listen to update model value
1 parent f6d8132 commit 27c3f94

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/formkit/PrimeKnob.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ function handleInput(e: any) {
1111
context?.handlers.blur(e)
1212
}
1313
14+
function updateValue(n: number) {
15+
context?.node.input(n)
16+
}
17+
1418
const styleClass = computed(() => (context?.state.validationVisible && !context?.state.valid) ? `${attrs?.class} p-invalid` : attrs?.class)
1519
</script>
1620

@@ -40,6 +44,7 @@ const styleClass = computed(() => (context?.state.validationVisible && !context?
4044
:pt-options="attrs.ptOptions"
4145
:unstyled="attrs.unstyled ?? false"
4246
@change="handleInput"
47+
@update:model-value="updateValue"
4348
/>
4449
</div>
4550
</template>

0 commit comments

Comments
 (0)