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
15.94k stars 2.54k forks source link

Placeholder Content Not Updating #12219

Closed NgYueHong closed 3 months ago

NgYueHong commented 3 months ago

Package

filament/filament

Package Version

3.2

Laravel Version

11

Livewire Version

No response

PHP Version

8.3

Problem description

The content update is working on TextInput, but not on Placeholder

TextInput::make('name')
    ->live(onBlur:true)
->afterStateUpdated(function (string $state, Forms\Set $set){
    $set('slug', Str::slug($state));
    $set('myplaceholder', Str::slug($state));
}),

TextInput::make('slug'),

Placeholder::make('myplaceholder')->content("default content"),

Expected behavior

The Placeholder content should be updated as well

Steps to reproduce

Just copy & paste my code on any resource page, can see the problem.

Reproduction repository

No repository

Relevant log output

No response

github-actions[bot] commented 3 months ago

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

However, it looks like you forgot to fill in the reproduction repository URL. Can you edit your original post and then we'll look at your issue?

We need a public GitHub repository which contains a Laravel app with the minimal amount of Filament code to reproduce the problem. Please do not link to your actual project, what we need instead is a minimal reproduction in a fresh project without any unnecessary code. This means it doesn't matter if your real project is private / confidential, since we want a link to a separate, isolated reproduction. That would allow us to download it and review your bug much easier, so it can be fixed quicker. Please make sure to include a database seeder with everything we need to set the app up quickly.