custom field viewData closure returns empty always
hi , im trying to make a custom item list cards for packages
the following implementation works fine
however when i do the following it doesn't return anything ,
what am i missing or doing wrong ?
any help is appreciated
18 Replies
bump
I think you could use PackageCard state to do this
can you elaborate
thanks for your reply
saying i want to make checkboxs for the items to select one of them , how can i use the state here to tell my field i selected an item
using alpinejs state?
sorry for my late reply , we had a power outage
thanks for your help as always
i tried this and for some reason doing a where closure will cause it to not show any options , if we get all the packages it will work fine and display them
it's kinda a weird behavior , have any idea why and what cause that ?
the form wizard code
![No description](https://cdn.answeroverflow.com/1266336797768548407/image.png)
PackageCard:
![No description](https://cdn.answeroverflow.com/1266336905495056445/image.png)
blade :
![No description](https://cdn.answeroverflow.com/1266337013905490024/image.png)
it seems whether i use
viewData
or options
the same issue persists with the use of closure will only not show any datawhere closure will cause it to not show any optionsDid you check what
$get('country_id')
returns? if the where condition returns zero results?
I think the issues is:
- You are rendering the options once and wire:ignore
updates
- Then the field is changed, but the options aren't updated in the blade filegoddam that
wire:ignore
gave me couple hours of headache 🤦
much appreciated
@Dennis Koch if it's possible to ask another question !
in my wizard i want to do a pop up in the first step when a user press next which will give me the ability to show/hide a step along the way , how can i do that , i searched but couldn't find anythingSorry, I don't have experience with wizards