Skip to content

Commit

Permalink
Merge pull request #872 from 3YOURMIND/naruto/pre-upgrade/prop-erly-u…
Browse files Browse the repository at this point in the history
…se-props

refactor(KtField*Select*): Use $props on Template
  • Loading branch information
carsoli authored Jan 15, 2024
2 parents 19ec923 + 260feb3 commit 9cf2028
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<GenericSelectField
v-bind="props"
v-bind="$props"
:helpTextSlot="$slots.helpText"
isMultiple
@emit="onEmit"
Expand All @@ -25,12 +25,11 @@ export default defineComponent({
GenericSelectField,
},
props: makeProps(KottiFieldMultiSelect.propsSchema),
setup(props: KottiFieldMultiSelect.PropsInternal, { emit }) {
setup(_, { emit }) {
return {
onEmit: ({ event, payload }: { event: string; payload: unknown }) => {
emit(event, payload)
},
props,
}
},
})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<GenericSelectField
v-bind="props"
v-bind="$props"
:helpTextSlot="$slots.helpText"
isMultiple
isRemote
Expand All @@ -26,12 +26,11 @@ export default defineComponent({
GenericSelectField,
},
props: makeProps(KottiFieldMultiSelectRemote.propsSchema),
setup(props: KottiFieldMultiSelectRemote.PropsInternal, { emit }) {
setup(_, { emit }) {
return {
onEmit: ({ event, payload }: { event: string; payload: unknown }) => {
emit(event, payload)
},
props,
}
},
})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<GenericSelectField
v-bind="props"
v-bind="$props"
:helpTextSlot="$slots.helpText"
@emit="onEmit"
>
Expand All @@ -24,12 +24,11 @@ export default defineComponent({
GenericSelectField,
},
props: makeProps(KottiFieldSingleSelect.propsSchema),
setup(props: KottiFieldSingleSelect.PropsInternal, { emit }) {
setup(_, { emit }) {
return {
onEmit: ({ event, payload }: { event: string; payload: unknown }) => {
emit(event, payload)
},
props,
}
},
})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<GenericSelectField
v-bind="props"
v-bind="$props"
:helpTextSlot="$slots.helpText"
isRemote
@emit="onEmit"
Expand All @@ -25,12 +25,11 @@ export default defineComponent({
GenericSelectField,
},
props: makeProps(KottiFieldSingleSelectRemote.propsSchema),
setup(props: KottiFieldSingleSelectRemote.PropsInternal, { emit }) {
setup(_, { emit }) {
return {
onEmit: ({ event, payload }: { event: string; payload: unknown }) => {
emit(event, payload)
},
props,
}
},
})
Expand Down

0 comments on commit 9cf2028

Please sign in to comment.