Skip to content

Commit

Permalink
fix(BaseInputFileHeadless): bind default slot values
Browse files Browse the repository at this point in the history
  • Loading branch information
stafyniaksacha committed Aug 28, 2023
1 parent 3f7be0b commit bc49903
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions components/form/BaseInputFileHeadless.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const props = withDefaults(
id: undefined,
modelValue: undefined,
filterFileDropped: () => true,
}
},
)
const emits = defineEmits<{
(event: 'update:modelValue', value?: FileList | null): void
Expand Down Expand Up @@ -90,7 +90,7 @@ provide(
remove,
preview: useNinjaFilePreview,
drop,
})
}),
)
defineExpose({
Expand Down Expand Up @@ -129,11 +129,11 @@ defineExpose({
<div class="group/nui-file-headless relative">
<slot
:id="id"
:el="el"
:files="files"
:el="inputRef"
:files="value"
:open="open"
:remove="remove"
:preview="preview"
:preview="useNinjaFilePreview"
:drop="drop"
></slot>
<input
Expand All @@ -142,7 +142,7 @@ defineExpose({
type="file"
v-bind="$attrs"
class="hidden"
@change="(event) => value = (event.target as HTMLInputElement).files"
@change="(event) => (value = (event.target as HTMLInputElement).files)"
/>
</div>
</template>

0 comments on commit bc49903

Please sign in to comment.