Updating placeholder text afterStateUpdated

Hey all, I currently have. a form where the user can optinally a select a relationship. If the relationship is present it will use the value of the fields from that relationship. Unless the corresponding field is filled in the current form. The problem is that i want to display the values of the relation to the user but not fill the field to do that. So I want to change the placeholder after the state update.

currently i have the following:
Select::make('product_id')
                        ->label('Product')
                        ->translateLabel()
                        ->relationship('product', 'name')
                        ->searchable()
                        ->preload()
                        ->live()
                        ->afterStateUpdated(function (callable $set, $state) {
                            $product = Product::find($state);
                            $set('name', $product->name);

At the moment it just updates the value. What i want instead is that it will update the placeholder of the name field instead.

Is there any way to do this?
Was this page helpful?