CodeWithDennis / filament-select-tree

The multi-level select field lets you pick one or multiple options from a list that is neatly organized into different levels.
MIT License
225 stars 32 forks source link

[Bug]: Unable to save category_id #79

Closed atapatel closed 8 months ago

atapatel commented 9 months ago

What happened?

I am unable to save category_id. On browser console I get following error.

Livewire Entangle Error: Livewire property ['data.category_id'] cannot be found on component: ['app.filament.contractor.resources.project-template-resource.pages.create-project-template']
module_default.interceptor.Object.defineProperty.get.isLive @ livewire.js?id=a27c4ca2:3846

How to reproduce the bug

Adding SelectTree input filed in Resource.

Package Version

3.1.26

PHP Version

8.1.0

Laravel Version

10.0

Which operating systems does with happen with?

macOS

Notes

No response

CodeWithDennis commented 9 months ago

Need more information, perhaps a repo.

atapatel commented 8 months ago

I have solve this issue by adding below code in Create[ANY_RESOURCE]Record .

    protected function afterFill()
    {
        $this->fill(['data' => ['category_id'=>'']]);
    }