outl1ne / nova-simple-repeatable

A Laravel Nova simple repeatable rows field.
MIT License
73 stars 42 forks source link

hideWhenUpdating does not work properly #51

Open ObaydaAlesawi opened 1 year ago

ObaydaAlesawi commented 1 year ago

I'm using hideWhenUpdating on a field that's in SimpleRepeatable, but it did not hide the field, any ideas why?

mrleblanc101 commented 7 months ago

Same, I have Text::make('Label') and URL::make('URL') that display this table when editing. Screenshot 2024-01-24 at 10 07 40 AM. I want to hide the "Label" field and display a combined link like so:

SimpleRepeatable::make('Links', 'links', [
    Text::make(__('Label'))->onlyOnForms(),
    URL::make(__('URL'))
        ->displayUsing(fn ($url, $row) => $row['label']),
])

I would expect this result: Screenshot 2024-01-24 at 10 11 37 AM But I get this, the Text::make('Label')->onlyOnForms() is not hidden. Screenshot 2024-01-24 at 10 11 42 AM