You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make sure both Splade packages (JS + PHP) are up-to-date and on the same version. For example, when using version 0.5.0 of the PHP package, you should use the same JavaScript package version.
Description:
I have the following where the products and the colors are created by pushing into the arrays products and colors respectively.
A lot of the code was omitted for conciseness.
<x-splade-form default="{
products: [
{
colors: [
{
image: '',
parent_index': '',
// parent index receives the index of the product it is nested in
}
]
}
]
}"
>
<template v-for="(product, index) in form.products" key="index">
<template v-for="(color, index) in product.colors" key="index">
<x-splade-file filepond preview
v-model="color.image"
label="Color"
/>
</template>
</template>
</x-splade-form>
I have been trying to bind the color.image to products.${color.parent_index}.colors.${index}.image which holds the value products.0.colors.0.image
Passing products.0.colors.0.image directly to v-model works but I need to compose this dynamically so it works for subsequent items(products, color)
Steps To Reproduce Issue:
I have tried the following and they have all failed
The text was updated successfully, but these errors were encountered:
thecyrilcril
changed the title
Question: How do you bind a nested file to the splade form component
Question: How do you bind a nested file component to the splade form component
Sep 14, 2023
thecyrilcril
changed the title
Question: How do you bind a nested file component to the splade form component
Nested splade file component does not bind to its parent but to the form component directly
Sep 22, 2023
You may use the built-in Artisan Command to show the installed versions of the packages:
Make sure both Splade packages (JS + PHP) are up-to-date and on the same version. For example, when using version 0.5.0 of the PHP package, you should use the same JavaScript package version.
Description:
I have the following where the products and the colors are created by pushing into the arrays
products
andcolors
respectively.A lot of the code was omitted for conciseness.
I have been trying to bind the
color.image
toproducts.${color.parent_index}.colors.${index}.image
which holds the valueproducts.0.colors.0.image
Passing
products.0.colors.0.image
directly to v-model works but I need to compose this dynamically so it works for subsequent items(products, color)Steps To Reproduce Issue:
I have tried the following and they have all failed
The text was updated successfully, but these errors were encountered: