filamentphp / filament

A collection of beautiful full-stack components for Laravel. The perfect starting point for your next app. Using Livewire, Alpine.js and Tailwind CSS.
https://filamentphp.com
MIT License
19.01k stars 2.94k forks source link

KeyValue form component collapsing before can actually enter anything into the new rows when clicking add row #7785

Closed Cigoler closed 1 year ago

Cigoler commented 1 year ago

Package

filament/filament

Package Version

v3.0.22

Laravel Version

v10.10

Livewire Version

v3

PHP Version

PHP 8.1.0

Problem description

When clicking the add row button the table flashes to indicate the creation of the row, but quickly collapses back to no rows.

Expected behavior

A row to be created, and able to enter information into.

Steps to reproduce

This repository should demonstrate it on the user create page when you login to the admin panel. I notice (on windows) if I use sail down that the page, if it's still loaded will then start working.

Reproduction repository

https://github.com/Cigoler/fv3-keyvalue-issue

Relevant log output

No response

Link to discord help topic: https://discord.com/channels/883083792112300104/1140992574476267610

Donate 💰 to fund this issue

Fund with Polar

steveallinson commented 1 year ago

Can confirm this is an issue for us also after recent update. Video of the issue here. Using the KeyValue with a wizard.

killjin commented 1 year ago

Confirmed that there is no problem under livewire 3.0.0-beta.7, it seems that the problem of livewire changes

killjin commented 1 year ago

change filament/packages/forms/resources/js/components/key-value.js

this.state = state 

to

JSON.stringify(state) != "{}" && (this.state = state) 

can be solved

Livewire Below 3.0 beta7, the state change will not trigger the request immediately.

Cigoler commented 1 year ago

Well it was working with filament v3.0.19 (had another instance on another PC with the older version), but soon as I upgraded to filament v3.0.22 it stopped working, but I'll try your fix - what version of livewire does v3.0.22 use? (It's livewire/livewire v3.0.0-beta.9 for those interested)

Edit: Oh I see, I misread what you were saying Killjin.

killjin commented 1 year ago

This may be a livewire bug, entangle is delayed by default, and now it is live.

killjin commented 1 year ago

https://github.com/filamentphp/filament/pull/7807 Fix

wit3 commented 1 year ago

the bug is still in version v3.0.40 @danharrin

danharrin commented 1 year ago

Please check your Livewire version

wit3 commented 1 year ago

Please check your Livewire version

"livewire/livewire": "^3.0.2"

it's the latest 😕

danharrin commented 1 year ago

Fixed by #8386