You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: reference/forms/types/entity.rst
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -202,9 +202,9 @@ query_builder
202
202
Allows you to create a custom query for your choices. See
203
203
:ref:`ref-form-entity-query-builder` for an example.
204
204
205
-
The value of this option can either be a ``QueryBuilder`` object or a Closure.
205
+
The value of this option can either be a ``QueryBuilder`` object, a Closure or null.
206
206
When using a Closure, you will be passed the ``EntityRepository`` of the entity
207
-
as the only argument and should return a ``QueryBuilder``.
207
+
as the only argument and should return a ``QueryBuilder``. If you'd like to display a list of empty entries, you can return null in the query_builder closure.
0 commit comments