CRUD
CRUD copied to clipboard
[v6][Bug] Columns created from field definition arrays still have their classes
Bug report
What I did
In the DEMO, we create the columns in ColumnMonsterCrudController out of fields that have wrapperAttributes:
[ // Month
'name' => 'week',
'label' => 'Week'.backpack_free_badge(),
'type' => 'week',
'wrapperAttributes' => ['class' => 'form-group col-md-4'],
'tab' => 'Time and space',
],
What I expected to happen
Show a clean column.
What happened
Some columns do NOT show a clean output, because they keep those classes on the wrapper attributes.
What I've already tried to fix it
Nothing. Right now in the DEMO we manually remove those classes. I'm not sure we should do something about it... I kind of EXPECT that, to be honest. But it's worth talking about this in a team setting. What do you guys think we should do @pxpm & @jorgetwgroup ?
We talked about the possibility to create: addColumnsFromFields($fields) method that would strip the required stuff to make the fields work as columns.
In the mentioned example, the bootstrap sizing classes.