79086255

Date: 2024-10-14 13:06:07
Score: 0.5
Natty:
Report link

Ok, I found a solution with the "debounce", but I had applied it wrongly because directly on an entity object.

In the twig

{{ form_row(form.operationDate, {'attr': { 'data-model': 'debounce(200)|account_transaction.operationDate' }} ) }}

My mistake was the wrong naming of the data-model. It should point to the object first and then the attribute (and not directly to the attribute).

Also, the value of debounce must be large enough to wait until the input is complete, but also too large for the event to be passed on anyway. In my case, I chose a value of 200 ms, after a few tries.

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Wikub