Hallo,
I’m trying to generate a language select field (on panel side) but I’m getting a "Cannot read properties of undefined (reading ‘forEach’) for the following code:
Hi there, I’m a bit at a loss what you are doing there? Is that supposed to be a field blueprint defined via a plugin? Please provide more context if what follows doesn’t solve your problem.
Having said that, the property is called options (plural) not option, which might be the problem here.
By the way, is there a way to add pagination to the results of src/components/Products.vue… I’ve tried several option found on the web but without luck. I’m stuck with the loading of external components like this one: HENNGE/vue3-pagination (github.com).
The property is still called options for all I know, but I just tried @distantnative’s example (replacing option with options) and getting this.options.forEach is not a function
No, I just didn’t realise that those programmatic fields in dialogs probably don’t run again through a blueprint interpreter. So we actually have to provide all the options programmatically directly.
Re. pagination: Yes, pagination is in general possible (take a look at the source code for the users view
-kirby/panel/src/components/Views/UsersView.vue
kirby/config/areas/users/views.php
However, this uses a users collection which can be paginated (in the PHP part) and a k-collection component which has a pagination property). I think the current implementation in the recipe would need some changes to make this work, or at least I don’t know how to implement it into the table.