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

Hidden placeholder data sent in dehydrated section #13964

Open
andy-UKC opened this issue Aug 16, 2024 · 0 comments
Open

Hidden placeholder data sent in dehydrated section #13964

andy-UKC opened this issue Aug 16, 2024 · 0 comments
Labels
Milestone

Comments

@andy-UKC
Copy link

andy-UKC commented Aug 16, 2024

Package

filament/filament

Package Version

v3.2.102

Laravel Version

v11.0.0

Livewire Version

v3.0.0

PHP Version

PHP 8.3.0

Problem description

A hidden Placeholder inside a Section that has a relationship and has "manual" saving, will send null as a value.

Expected behavior

The placeholder to not be sent (even as null)

Steps to reproduce

It requires:

  • Section with a relationship
  • Manually saving that data using dehydrated() and mutateRelationshipDataBeforeSaveUsing(fn () => [])
  • the Placeholder having hidden()

Then in handleRecordUpdate(), the $data object will have something like $data['relationshipName']['placeholderName'] = null

Reproduction repository (issue will be closed if this is not valid)

https://github.com/andy-UKC/filament-issue-placholder-data-sent-on-hidden

Relevant log output

"something" => array:5 [▼
    "id" => 1
    "title" => "something"
    "created_at" => null
    "updated_at" => null
    "should_not_show" => null
  ]

Donate 💰 to fund this issue

  • You can donate funding to this issue. We receive the money once the issue is completed & confirmed by you.
  • 100% of the funding will be distributed between the Filament core team to run all aspects of the project.
  • Thank you in advance for helping us make maintenance sustainable!
Fund with Polar
@andy-UKC andy-UKC added bug Something isn't working medium priority unconfirmed labels Aug 16, 2024
@danharrin danharrin added this to the v3 milestone Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Todo
Development

No branches or pull requests

2 participants