Filament Select Field Option Display Issue

The issue I'm facing is that the Select field is showing the modified HTML option (from getCleanOptionString) in both the dropdown and the selected state. I want to show a different representation like only the product when the option is selected.
Forms\Components\Select::make('product_id')
    //
    ->allowHtml(true)
    ->options(
        Product::query()
            ->whereHas('stocks', function ($query) {
                $query->where('remaining_stock', '>', 0);
            })
            ->limit(10)
            ->orderBy('name')
            ->get()
            ->mapWithKeys(fn($product) => [
                $product->getKey() => static::getCleanOptionString($product)
            ])
            ->toArray()
    )
    ->getOptionLabelUsing(function ($value) {
     $product = Product::find($value);
     return $product ? $product->name : '';
})
Screenshot_2568-04-09_at_22.16.25.png
Was this page helpful?