Skip to content

Commit

Permalink
fix select2 in local tag mode
Browse files Browse the repository at this point in the history
  • Loading branch information
lenadax committed Oct 22, 2024
1 parent a484a74 commit ce515ef
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/yafowil/widget/select2/example.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ def json_data(term):
'id': val,
'text': val,
})
print(term)
print(data)
return data


Expand Down Expand Up @@ -82,10 +80,11 @@ def json_data(term):
.. code-block:: python
value = [u'Sämling', u'Scheurebe']
vocabulary = [('a', u'Sämling'), ('b', u'Scheurebe')]
value = ['a', 'b']
select2 = factory('#field:select2', value=value, props={
'label': 'Select or add some items',
'inputtag': True,
'vocabulary': vocabulary,
'placeholder': 'Select or add some items',
'minimumInputLength': 1,
'multiple': True,
Expand Down Expand Up @@ -203,10 +202,11 @@ def get_example():

# input mode
select2_3 = factory(u'fieldset', name='yafowil_select2_3')
select2_3_val = [u'Sämling', u'Scheurebe']
select2_3_val = ['a', 'b']
select2_3_vocab = [('a', u'Sämling'), ('b', u'Scheurebe')]
select2_3['text'] = factory('#field:select2', value=select2_3_val, props={
'label': 'Select or add some items',
'inputtag': True,
'vocabulary': select2_3_vocab,
'placeholder': 'Select or add some items',
'minimumInputLength': 1,
'multiple': True,
Expand Down

0 comments on commit ce515ef

Please sign in to comment.