#109385TCA selectMultipleSideBySide doesn't filter available items
Description
This is a problem I never spotted before but could reproduce at least since TYPO3 v12. Same faulty behaviour in v13 and v14.2.0-dev.
Problem can easily be reproduced by installing EXT:mr_usrgrpmgmt from TER or composer (causal/mr_usrgrpmgmt)
TCA
You need something like that:
'config' => [
'type' => 'select',
'renderType' => 'selectMultipleSideBySide',
'itemsProcFunc' => \Causal\MrUsrgrpmgmt\Tca\ItemFunctions::class . '->getUsers',
'size' => 12,
'minitems' => 0,
'maxitems' => 999,
],
Inside that itemsProcFunc, you must provide a complete list of items, both available and those that may have been selected already, otherwise the TCA doesn’t work as expected.
Hardcoded list of items
Actually the problem is not limited to dynamically generated list of items, the same faulty behaviour (see below) will happen with a hardcoded list of items:
'config' => [
'type' => 'select',
'renderType' => 'selectMultipleSideBySide',
'items' => [
['label' => 'user 1', 'value' => 1],
['label' => 'user 2', 'value' => 2],
],
'size' => 12,
'minitems' => 0,
'maxitems' => 999,
],
Faulty behaviour
clipboard-202603261607-red63.png
- Although an item is not authorized to be selected multiple times in the TCA, selected items are still in the right hand side, ready to be clicked.
- Clicking an already selected item does nothing
- Clicking a not-yet-selected item will correctly move it from the right hand side to the left hand side
Expected behaviour
The right hand side should not show items already selected in the left hand side.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Files 1
History 3
-
Georg Ringer changed Sprint Focus On Location Sprint 08/06/26, 16:13
-
Georg Ringer commented and changed status
NewNeeds Feedback 08/06/26, 18:54 -
Georg Ringer commented and changed status
Needs FeedbackClosed 10/07/26, 14:47closing because of lack of feedback. if this is still valid in v14, please create a new issue and provide information to reproduce it. thanks!
can you please test that in styleguide extension? this looks totally fine in main and styleguide
'select_multiplesidebyside_3' => [ 'label' => 'select_multiplesidebyside_3 itemListStyle, selectedListStyle', 'config' => [ 'type' => 'select', 'renderType' => 'selectMultipleSideBySide', 'items' => [ ['label' => 'foo 1', 'value' => 1], ['label' => 'foo 2', 'value' => 2], ['label' => 'foo 3', 'value' => 3], ], 'itemListStyle' => 'width:250px;background-color:#ffcccc;', 'selectedListStyle' => 'width:250px;background-color:#ccffcc;', 'size' => 2, ], ],