File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -352,6 +352,21 @@ clicked). To do that, use ``norender`` modifier:
352
352
353
353
<input data-model="norender|max">
354
354
355
+ For a form using ``ComponentWithFormTrait ``, override the ``getDataModelValue() `` method::
356
+
357
+ private function getDataModelValue(): ?string
358
+ {
359
+ return 'norender|*';
360
+ }
361
+
362
+ .. tip ::
363
+
364
+ You can also define this value inside Twig::
365
+
366
+ .. code-block :: html+twig
367
+
368
+ {{ form_start(form, {attr: {'data-model': 'norender|*'}}) }}
369
+
355
370
Now, as you type, the ``max `` "model" will be updated in JavaScript, but
356
371
it won't, yet, make an Ajax call to re-render the component. Whenever
357
372
the next re-render *does * happen, the updated ``max `` value will be
You can’t perform that action at this time.
0 commit comments