lukaveck1
Having to click action button twice for changes to take place
I have this Button and on click I want to change pdf template
Actions\Action::make('test_smthng')
->label('Change PDF preview')
->action(fn () => $this->selectedView = 'pdf-templates.layout.pdf-preview-default')
and this ViewFIeld that's showing the custom template
protected function getTemplateSection(): Component
{
return Section::make('PDF Preview')
->schema([
Grid::make(1)
->schema([
])->columnSpan(1),
Grid::make()
->schema([
ViewField::make('preview.default')
->columnSpan(2)
->visible()
->view($this->selectedView)
For some reason when I first click on button it doesn't render the selectedView, but when I click again it does. Any ideas?
I tried dispatching refresh on action $this->dispatch('refresh'); and even directly with setting ID on viewfield, but it doesn't work.8 replies
FIlament Bulk Delete causes this.$refs.modalContainer is undefined
Watch attached video: Trying to delete record or records causes this error and I have no idea why this.$refs.modalContainer is undefined. The modal for approving deletion gets triggered in background, you can see it, but something falls off and I have no idea where to even begin with this.
13 replies
Can't get value of input field when submitting modal.
I'm not sure why I'm not getting state of another field here, basically I press on button and then modal opens with a new input field, then when I click on submit, I want to get that fields value, but I keep getting null when submitting - any ideas? When dumping $get('responseAskAI') I always get null for that input field.
5 replies