Bug #86594

selectMultipleSideBySide with minItems = 1 & maxItems = 1 available items stay hidden/disabled

Added by Kevin von Spiczak 2 months ago. Updated about 2 months ago.

Status:
Resolved
Priority:
Should have
Category:
Backend JavaScript
Target version:
-
Start date:
2018-10-08
Due date:
% Done:

100%

TYPO3 Version:
8
PHP Version:
7.1
Tags:
FormEngine, Backend, JavaScript
Complexity:
Is Regression:
Sprint Focus:
On Location Sprint

Description

When using the following TCA for a select field:

        'select_field' => [
            'exclude' => true,
            'label' => 'My select field,
            'config' => [
                'type' => 'select',
                'renderType' => 'selectMultipleSideBySide',
                'maxitems' => 1,
                'minitems' => 1,
                'size' => 5,
                'items' => [
                  ['Testing', 0],
                  ['Testing 1', 1],
                  ['Testing 2', 2],
                  ['Testing 3', 3],
                ],
                'autoSizeMax' => 20,
                'fieldControl' => [
                    'editPopup' => [
                        'disabled' => false,
                    ],
                    'addRecord' => [
                        'disabled' => false,
                    ],
                    'listModule' => [
                        'disabled' => false,
                    ],
                ],
            ],
        ],

Initially you should see all of the 3 items on the right side in available items. Now when you select one it disappears from the right and appears on the left (just as you would expect). When you want to change the selected one (on the left) to be another item from the right, you click an item from the right once more, the left one will not go back to the right but will disappear instead.
It only works as expected, when selecting the item from the left and using the trash icon. The items are still available in the HTML on the right side, I guess the issue is only that the elements keep the disabled="disabled" & class="hidden" in the HTML.
I recorded a short gif to showcase the behaviour (see attachment "demo") or see here: https://imgur.com/McZZUFT

I'm looking into this now and try to prepare a patch for it, but would like to have some other opinions on it as I'm not 100% sure that this is a bug or not.

Kapture 2018-10-08 at 12.18.04.gif View - demo (849 KB) Kevin von Spiczak, 2018-10-08 12:19

Associated revisions

Revision 881f7a17 (diff)
Added by Kevin von Spiczak about 2 months ago

[BUGFIX] Recover switched items in maxitems=1 selectMultipleSideBySide

Shows and re-enables all the options, that are currently not selected
when using maxitems = 1

Resolves: #86594
Releases: master, 8.7
Change-Id: I1f5e727ec42203981edaaf4b79bb6e201352d296
Reviewed-on: https://review.typo3.org/58599
Tested-by: TYPO3com <>
Reviewed-by: Andreas Fernandez <>
Tested-by: Andreas Fernandez <>
Reviewed-by: Daniel Goerz <>
Tested-by: Daniel Goerz <>
Reviewed-by: Nicolai Schirawski <>
Tested-by: Nicolai Schirawski <>
Reviewed-by: Eike Starkmann <>
Tested-by: Eike Starkmann <>
Reviewed-by: Christian Kuhn <>
Tested-by: Christian Kuhn <>
Reviewed-by: Benni Mack <>
Tested-by: Benni Mack <>

Revision 9447692d (diff)
Added by Kevin von Spiczak about 2 months ago

[BUGFIX] Recover switched items in maxitems=1 selectMultipleSideBySide

Shows and re-enables all the options, that are currently not selected
when using maxitems = 1

Resolves: #86594
Releases: master, 8.7
Change-Id: I1f5e727ec42203981edaaf4b79bb6e201352d296
Reviewed-on: https://review.typo3.org/58729
Tested-by: TYPO3com <>
Reviewed-by: Benni Mack <>
Tested-by: Benni Mack <>

History

#1 Updated by Gerrit Code Review 2 months ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58599

#2 Updated by Gerrit Code Review 2 months ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58599

#3 Updated by Gerrit Code Review 2 months ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58599

#4 Updated by Daniel Goerz about 2 months ago

  • Sprint Focus set to On Location Sprint

#5 Updated by Riccardo De Contardi about 2 months ago

is this one related? #78479

#6 Updated by Gerrit Code Review about 2 months ago

Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58729

#7 Updated by Kevin von Spiczak about 2 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF