Problem/Motivation
When using DraggableListBuilder for a Config Entity listing page, you have to change the way you specify your rows from how EntityListBuilder works. To wit:
class MyEntityListBuilder extends EntityListBuilder {
public function buildRow(EntityInterface $entity) {
$row['label'] = $this->getLabel($entity);
$row['id']= $entity->id();
return $row + parent::buildRow($entity);
}
// ...
}
Compare to:
class MyEntityListBuilder extends DraggableListBuilder {
public function buildRow(EntityInterface $entity) {
$row['label'] = $this->getLabel($entity);
$row['id']['#markup'] = $entity->id();
return $row + parent::buildRow($entity);
}
// ...
}
Note the extra ['#markup'] that is required for all fields in the row, except for label. Without that, the listing form will not render correctly; which headers and columns are hidden get mixed up and the wrong ones hidden.
This makes DraggableListBuilder not a proper subclass of EntityListBuilder, as its API is different in silent, undocumented ways. (Fancy academic version: It's violating the Liskov Substitution Principle.)
Thanks to Tim Plunkett for helping locate this issue after I spent 90 minutes scratching my head about it. :-)
Proposed resolution
Whatever special treatment that label gets in order to make the #markup sub-property optional should be applied to all fields.
Remaining tasks
Do it.
API changes
I'd argue none. This is just a bug.
Data model changes
None.