Skip to content

Commit 58dbf49

Browse files
alexislefebvrekbond
authored andcommitted
fix: warning and code formatting on Autocomplete
1 parent 21595a7 commit 58dbf49

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/Autocomplete/doc/index.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -290,13 +290,13 @@ Passing Extra Options to the Ajax-powered Autocomplete
290290
Autocomplete field options are not preserved when the field is rendered on an Ajax call. So, features like exclude some options
291291
based on the current form data are not possible by default. To partially avoid this limitation, the `extra_options` option was added.
292292

293-
::warning
293+
.. warning::
294294

295-
Only scalar values (`string`, `integer`, `float`, `boolean`), `null` and `arrays` (consisted from the same types as mentioned before) can be passed as extra options.
295+
Only scalar values (``string``, ``integer``, ``float``, ``boolean``), ``null`` and ``array`` (consisted from the same types as mentioned before) can be passed as extra options.
296296

297-
Considering the following example, when the form type is rendered for the first time, it will use the `query_builder` defined
298-
while adding a `food` field to the `FoodForm`. However, when the Ajax is used to fetch the results, on the consequent renders,
299-
the default `query_builder` will be used::
297+
Considering the following example, when the form type is rendered for the first time, it will use the ``query_builder`` defined
298+
while adding a ``food`` field to the ``FoodForm``. However, when the Ajax is used to fetch the results, on the consequent renders,
299+
the default ``query_builder`` will be used::
300300

301301
// src/Form/FoodForm.php
302302
// ...
@@ -323,8 +323,8 @@ the default `query_builder` will be used::
323323
}
324324

325325
If some food can be consisted of other foods, we might want to exclude the "root" food from the list of available foods.
326-
To achieve this, we can remove the `query_builder` option from the above example and pass the `excluded_foods` extra option
327-
to the `FoodAutocompleteField`::
326+
To achieve this, we can remove the ``query_builder`` option from the above example and pass the ``excluded_foods`` extra option
327+
to the ``FoodAutocompleteField``::
328328

329329
// src/Form/FoodForm.php
330330
// ...
@@ -345,8 +345,8 @@ to the `FoodAutocompleteField`::
345345
}
346346
}
347347

348-
The magic of the `extra_options` is that it will be passed to the `FoodAutocompleteField` every time an Ajax call is made.
349-
So now, we can just use the `excluded_foods` extra option in the default `query_builder` of the `FoodAutocompleteField`::
348+
The magic of the ``extra_options`` is that it will be passed to the ``FoodAutocompleteField`` every time an Ajax call is made.
349+
So now, we can just use the ``excluded_foods`` extra option in the default ``query_builder`` of the ``FoodAutocompleteField``::
350350

351351
// src/Form/FoodAutocompleteField.php
352352
// ...
@@ -602,7 +602,7 @@ If you need to pass extra options to the autocompleter, you can do so by impleme
602602

603603
.. tip::
604604

605-
If you want to know **why** you might need to use the `extra options` feature, see :ref:`passing-extra-options-to-the-ajax-powered-autocomplete`.
605+
If you want to know **why** you might need to use the ``extra_options`` feature, see :ref:`passing-extra-options-to-the-ajax-powered-autocomplete`.
606606

607607
.. code-block:: diff
608608

0 commit comments

Comments
 (0)