mirror of
https://github.com/Hopiu/django-select2.git
synced 2026-05-12 15:23:10 +00:00
add the hashed field_id to the 'data-select2-id' attr
This commit is contained in:
parent
36bac0570f
commit
e0686628d7
1 changed files with 1 additions and 0 deletions
|
|
@ -492,6 +492,7 @@ class HeavySelect2FieldBaseMixin(object):
|
|||
# could have directly set field_id on it.
|
||||
if hasattr(self, 'field_id'):
|
||||
self.widget.field_id = self.field_id
|
||||
self.widget.attrs['data-select2-id'] = self.field_id
|
||||
|
||||
# Widget should have been instantiated by now.
|
||||
self.widget.field = self
|
||||
|
|
|
|||
Loading…
Reference in a new issue