Power-Components/livewire-powergrid

Alpine Expression Error: detailState is not defined Expression: "detailState ? 'bs5-rotate-90' : 'bs5-rotate-0'"

Closed this issue · 1 comments

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?

Yes. The error is specific to bootstrap 5 and the details are reported below

PHP Version

8.3.1

PowerGrid

6.1.1

Laravel

11.18.1

Livewire

3.5.4

Alpine JS

3.14.1

Theme

Bootstrap

Describe the bug.

The bug occurs when enabling the row details in powergrid in bootstrap theme.
The detail component gets loaded but the arrow does not rotate. This also has the below error corresponding to each row in the table.

Javascript console output:

Alpine Expression Error: detailState is not defined

Expression: "detailState ? 'bs5-rotate-90' : 'bs5-rotate-0'"
<svg class="bs5-w-h-1_5em" x-bind:class="detailState ? 'bs5-rotate-90' : 'bs5-rotate-0'" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">

Uncaught ReferenceError: detailState is not defined
Screenshot 2024-11-09 at 1 17 56 AM

To Reproduce...

Enable detail row using

PowerGrid::detail()
    ->view('components.table-detail')
    ->showCollapseIcon()

Extra information

No response