Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extra rows added to KV field when re-ordered in Builder field #9005

Closed
binaryfire opened this issue Oct 10, 2023 · 6 comments
Closed

Extra rows added to KV field when re-ordered in Builder field #9005

binaryfire opened this issue Oct 10, 2023 · 6 comments

Comments

@binaryfire
Copy link
Contributor

Package

filament/filament

Package Version

3.0.73

Laravel Version

10.2.6

Livewire Version

3.0.7

PHP Version

8.2

Problem description

Video: https://www.youtube.com/watch?v=NhrMKYYAoWM

Additionally, these phantom rows can't be deleted (the delete button doesn't work)

Expected behavior

Extra rows shouldn't be added when the KV field is moved.

Steps to reproduce

See video

Reproduction repository

https://github.com/binaryfire/filament-kv-bug

Relevant log output

No response

@github-actions
Copy link

Hey @binaryfire! We're sorry to hear that you've hit this issue. 💛

However, it doesn't look like you've provided much information on how to replicate the issue. Please edit your original post with clear steps we need to take.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 10, 2023
@github-project-automation github-project-automation bot moved this from Todo to Done in Roadmap Oct 10, 2023
@binaryfire
Copy link
Contributor Author

@danharrin This shouldn't have been auto-closed. I included a video which clearly demonstrates the issue and how to reproduce it.

@danharrin danharrin reopened this Oct 10, 2023
@github-project-automation github-project-automation bot moved this from Done to Todo in Roadmap Oct 10, 2023
@danharrin
Copy link
Member

In the future, the video can go in the "Steps to reproduce" field, so the bot knows that you've put in some effort

@zepfietje zepfietje added this to the v3 milestone Oct 11, 2023
@binaryfire binaryfire changed the title Extra rows being added to KV field when re-ordered Extra rows added to KV field when re-ordered in Builder field Oct 11, 2023
@binaryfire
Copy link
Contributor Author

binaryfire commented Nov 28, 2023

I'm also occasionally seeing this when I try and delete blocks containing KV fields from a Builder field. Perhaps it sheds more light on the problem:

image

@danharrin danharrin added bug in dependency help wanted and removed bug Something isn't working labels Dec 8, 2023
@danharrin
Copy link
Member

I'm sorry, I've spent like 4 hours on this now and cannot narrow down what is happening, I'm going to have to move on. If anyone wants to do more research:

  1. Rows arent actually getting added to the Alpine state
  2. This is a problem with thex-for something is replicating those template rows
  3. It only happens when Sortable.js reorders the rows
  4. This does not happen if the Alpine component is inline via x-data, or if it is registered via Alpine.data(). It only happens if the component is served with Async Alpine, so maybe that is part of what is wrong.

@awcodes
Copy link
Contributor

awcodes commented Dec 17, 2023

PR submitted to dependency to fix this issue.

Accudio/async-alpine#38

@awcodes awcodes closed this as completed Dec 17, 2023
@github-project-automation github-project-automation bot moved this from Todo to Done in Roadmap Dec 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

4 participants