Power-Components / livewire-powergrid

⚡ PowerGrid generates modern, powerful and easy-to-customize data tables using Laravel Livewire.
https://livewire-powergrid.com
MIT License
1.49k stars 220 forks source link

hidden() working but filter hide if hidden false #1337

Closed arjundexbytes closed 8 months ago

arjundexbytes commented 9 months ago

Have you searched through other issues to see if your problem is already reported or has been fixed?

Yes, I did not find it.

Did you read the documentation?

Yes, I did not find it.

Have you tried to publish the views?

Yes - I didn't work.

Is there an error in the console?

No

PHP Version

8.3.1

PowerGrid

5.2

Laravel

10.40

Livewire

3.3.5

Alpine JS

3.10.3

Theme

Tailwind 3.x

Describe the bug.

No response

To Reproduce...

First click on "FOO" then....

Extra information

Column::add()
            ->title('Vendor')
            ->field('vendor')
            ->hidden(isHidden:$this->getVendorId() ? true : false),

            Filter::select('vendor', 'vendor')
            ->dataSource(Vendor::orderBy('name')->get())
            ->optionValue('id')
            ->optionLabel('name')->builder(function (Builder $query, mixed $value) {
                $query->whereHas('vendor',function ($query) use($value) {
                    $query->where('vendor_id', $value);
                });
            }),
arjundexbytes commented 8 months ago

i have resolved