awcodes / filament-table-repeater

A modified version of the Filament Forms Repeater to display it as a table.
MIT License
188 stars 42 forks source link

getView to getDefaultView #96

Closed OwKe closed 5 months ago

OwKe commented 5 months ago

By changing getView() to getDefaultView() in TableRepeater.php it will allow users to override the default view if required which is not currently possible.

      TableRepeater::make('name')
                ->schema([])
                ->view('filament.plugins.components.table-repeater')
awcodes commented 5 months ago

Why would you need to override the view for this plugin?

At that point wouldn't it make more sense to just use a custom view with the normal Repeater component from Filament?

OwKe commented 5 months ago

I needed to add some extra actions buttons like this:

image

As I only needed to amend the default view and not the rest of the package, which is great btw, this seemed like a good approach and gives this package a bit more flexibility should it be required.

awcodes commented 5 months ago

I think it would be better to allow for adding more actions to that area than overriding the view, since that could have issues with breaking changes.

OwKe commented 5 months ago

That does make sense. I will take another look.

awcodes commented 5 months ago

Thanks. :)