This PR adds the option to limit the ExportAction to certain columns. Previously, the only choice we had to limit columns was to have a column mapping form where the user can choose columns. However, sometimes we either want the column mapping form not to show all columns, or to not show a column mapping form and directly export a subset of columns.
This adds a ->columns() method that will allow the user to either:
Specify which columns get shown in the column mapping form, if ->columnMapping(true) (default).
Specify which subset of columns get outputted in the export without showing a form, if ->columnMapping(false).
Basically the four choices are now:
// Show column mapping form, include all columns
// Show column mapping form, include only specified columns
->columns(['id', 'full_name', 'email'])
// Hide column mapping form, export all columns
->columnMapping(false)
Description
This PR adds the option to limit the
ExportAction
to certain columns. Previously, the only choice we had to limit columns was to have a column mapping form where the user can choose columns. However, sometimes we either want the column mapping form not to show all columns, or to not show a column mapping form and directly export a subset of columns.This adds a
->columns()
method that will allow the user to either:->columnMapping(true)
(default).->columnMapping(false)
.Basically the four choices are now:
Functional changes
composer cs
command.