Project

General

Profile

Actions

Feature #102675

open

Make selectMultipleSideBySide or a similar select-search dynamic (loading items per AJAX for large amounts of records)

Added by Bastian Stargazer 5 months ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Backend JavaScript
Target version:
-
Start date:
2023-12-15
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

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:
  1. finding a certain record even for single-select relations and
  2. 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

fe-users-relation-example.png (32.8 KB) fe-users-relation-example.png Bastian Stargazer, 2023-12-15 11:18

No data to display

Actions

Also available in: Atom PDF