mirror of
https://github.com/Hopiu/django-select2.git
synced 2026-04-09 16:21:00 +00:00
Documentation improvement.
I have just been bitten by this. While it's really related to select2, due to the fact that django-select2 adds his bits of abstraction on top of select2, I wasted quite some time making sure nothing was wrong with django-select2 in the first place... Hope it can help others, or help me if I happen to forget about it ;)
This commit is contained in:
parent
e1186229eb
commit
7721d6aeb5
1 changed files with 6 additions and 0 deletions
|
|
@ -127,6 +127,12 @@ class Select2Mixin(object):
|
|||
|
||||
There are other such intricacies, based on which some options are removed. By enforcing this
|
||||
restriction we make sure to not break the code by passing some wrong concotion of options.
|
||||
|
||||
.. tip:: According to the select2 documentation, in order to get the ``placeholder`` and ``allowClear``
|
||||
settings working, you have to specify an empty ``<option></option>`` as the first entry in your
|
||||
``<select>`` list. Otherwise the field will be rendered without a placeholder and the clear feature
|
||||
will stay disabled.
|
||||
|
||||
|
||||
:type select2_options: :py:obj:`dict` or None
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue