EntitySearchInput should be able to be initialized automatically like other PrestaShop components #29252
Open
5 of 6 tasks
Labels
8.0.x
Branch
CO
Category: Core
Developer Feature
Developer-oriented feature
Feature
Type: New Feature
javascript
Pull requests that update Javascript code
Needs Specs
Status: issue needs to be specified
Waiting for PM
Status: action required, waiting for product feedback
Prerequisites
Is your feature request related to a problem?
In PS 178 and even in 80 we introduced a
EntitySearchInput
js component, for now it is always initialised with explicit instanciation in the JS code. To ease the modules developer work this should be doable like other components relying on theinitComponents
methodDescribe the solution you'd like
Here is the expected solution:
automatic_init
false by default (naming should be improved)in the PrestaShop
initComponents
we can add aAutomaticEntitySearchInput
its role is to select the inputs by class and then loop through each one of them to get their IDs (already automatically created as well)Alternatives you've considered
Instead of creating a new
AutomaticEntitySearchInput
component which would only be used for theinitComponents
method, we can do a small refacto ofEntitySearchInput
:We'll need to think about how this automatic initialization is handled in the form type, should it be the default behaviour (then we should modify all the current uses) or should the automatic initialization be activated manually (thus it won't impact the current use cases).
Additional context
No response
Do you plan to work on this feature?
The text was updated successfully, but these errors were encountered: