Feature #102675
openMake selectMultipleSideBySide or a similar select-search dynamic (loading items per AJAX for large amounts of records)
0%
Description
The problem:
In our system we have hundred thousands of customers (fe_users). In multiple areas of our application some of there users can be assigned to related records.
Configuring the fe-user selection as "selectSingle" in TCA does not make sense, because its impossible to scroll through such a long option-list to find the requested user.
That's why we often use "selectMultipleSideBySide", also if the relation-type is N:1, just because this element provides a search-box to find a certain record, for example (also see attached image):
'fe_users_uid' => [
'exclude' => true,
'label' => 'Trainer',
'config' => [
'type' => 'select',
'renderType' => 'selectMultipleSideBySide',
'foreign_table' => 'fe_users',
'size' => 6,
'minitems' => 1,
'maxitems' => 1,
],
],
This workaround seems to work reliable, but with the huge amount of records another problem comes up: opening such a edit-form in BE, all records are loaded from the DB and rendered as select-options, which becomes very slow depending on the amount of records (or even sometimes the internet-connection slows down because the HTML doc of the form is so large).
The solution:It would be great to have a component like "selectMultipleSideBySide" which load its content dynamically via AJAX on search. This would solve both problems:
- finding a certain record even for single-select relations and
- it speeds up the BE editing by reducing the amount of record data (fetched from the DB and/or transferred to the client).
This example uses fe-users records, because we think its the most common case. But this problem occurs in the same way for other record-types and relations with huge amount of data.
Looking forward for your feedback or discussion.
Files
No data to display