lolmaheen
Get the index of current repeater item
TableRepeater::make('products') >label('Products') ->headers([ Header::make('Product'), Header::make('Quantity'), Header::make('Total Price'), ]) ->schema( function (){ return [ Select::make('product_id') ->readOnly() ->searchable() ->required()tried not working readOnly does not exist on either setting dehydrated after disabled also not working
11 replies
Get the index of current repeater item
also since my product is auto selected based on platform
i want to keep this field disabled
but if i do then it does not save and include this in form request because of
public function
disabled(bool | Closure $condition = true): static
{
$this->isDisabled = $condition;
$this->dehydrated(fn (Component $component): bool => ! $component->evaluate($condition));
return $this;
}``11 replies
Text Input Column Validation Not Working
Passing the record parameter makes this unexecutable
fn ($record, $component) => function ($attributes, $value, $fail) use ($record)
if i used it directly:
->rules([ function ($attributes, $value, $fail)
It gets executed but I want to access the $record to compare updated value with the original record value.
->rules([ function ($attributes, $value, $fail)
It gets executed but I want to access the $record to compare updated value with the original record value.
4 replies