Replies: 1 comment
-
I would accept this PR, yes |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I've been thinking whether it would make sense to add some
maxSelectableRecords()
method to Table, that could limit the number of selectable records. I know that there already ischeckIfRecordIsSelectableUsing()
, but accessing the selected records in its closure for checking would require entangling theselectedRecords
js property (viacurrentSelectionLivewireProperty()
), which shouldn't really be needed for something simple like this.Also, with the newly added ModalTableSelect component, I feel like it's missing this exact feature. Although
selectedRecords
is entangled there, addingcheckIfRecordIsSelectableUsing()
inside the TableSelectLivewireComponent doesn't really make sense neither, as it could potentionally conflict with the developer defined implementation in a table configuration class.Adding the
maxSelectableRecords()
would most likely require passing a new argument into the filamentTable Alpine component (the max limit), adding some logic there and also making sure the checkboxes, that are used for selecting, actually get disabled in the blade view (record, bulk and group). The change would be relatively big and might add some overhead due to all the checks though.If this is something that makes sense and is suitable for the framework, I'd be happy to try and implement it in a PR. What do you think? @danharrin
Beta Was this translation helpful? Give feedback.
All reactions