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
18.07k stars 2.83k forks source link

Repeater Field Issue #8313

Closed alifallahrn closed 1 year ago

alifallahrn commented 1 year ago

Package

filament/filament

Package Version

v3.0-stable

Laravel Version

v10

Livewire Version

v3.0@beta

PHP Version

PHP 8.1.9

Problem description

When using a Repeater field that contains a searchable select field, I experience the following issue: If I click "Add new" to create a new item within the Repeater field and then delete it by clicking the trash icon, and subsequently click "Add new item" to add another item, I lose the ability to close the newly added item, and one or two items are automatically created. If there are required fields within the Repeater structure, it becomes impossible to submit the form.

https://github.com/filamentphp/filament/assets/25011798/30cc922f-29e8-4322-800c-48c5a56502c8

Expected behavior

The expected behavior is that I should be able to add and delete items in the Repeater field without encountering any issues. The Repeater should allow me to add, delete, and close items as needed

Steps to reproduce

  1. Go to the form that contains a Repeater field with a searchable select field.
  2. Click "Add new" in the Repeater field to create a new item.
  3. Click the trash icon to delete the newly added item.
  4. Click "Add new item" again to add another item.
  5. Attempt to close the newly added item.
  6. Observe that one or two items are created automatically.

Reproduction repository

https://github.com/alifallahrn/filament

Relevant log output

No response

danharrin commented 1 year ago

Please update Livewire