Skip to content

Commit

Permalink
Changed the default behavior of searchable dropdowns to consider all …
Browse files Browse the repository at this point in the history
…words in the options rather than just the beginning
  • Loading branch information
mtabacman committed Apr 7, 2024
1 parent 741aeee commit abb1f6e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,17 +112,17 @@ SemanticUIComponentSupplierTest >> testDropdownListApplyingApplyingToOptions [
SemanticUIComponentSupplierTest >> testDropdownListNamedApplying [

self
assertRenderingOf: [ :supplier |
assertRenderingOf: [ :supplier |
| list |

list := supplier
dropdownListNamed: 'The name'
applying: [ :dropdownList | dropdownList addClass willow ].
dropdownListNamed: 'The name'
applying: [ :dropdownList | dropdownList addClass willow ].
list on trigger inform: 'Triggered!'.
list
]
equals:
'<div class="item willow ui selection dropdown item" id="id1"><input name="2" id="input-id3" type="hidden"/><i class="dropdown icon"></i><div class="default text">The name</div><div class="menu"></div></div><script type="text/javascript">$("#id1").dropdown();$("#input-id3").change(function(event){alert("Triggered!")});</script>'
'<div class="item willow ui selection dropdown item" id="id1"><input name="2" id="input-id3" type="hidden"/><i class="dropdown icon"></i><div class="default text">The name</div><div class="menu"></div></div><script type="text/javascript">$("#id1").dropdown({"fullTextSearch":"exact"});$("#input-id3").change(function(event){alert("Triggered!")});</script>'
]

{ #category : #'tests-Supplying' }
Expand Down
4 changes: 3 additions & 1 deletion source/Willow-SemanticUI/SemanticDropdown.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ SemanticDropdown >> configureValueOf: anInput [
{ #category : #'private - accessing' }
SemanticDropdown >> dropdownScriptOn: aCanvas [

^ aCanvas jQuery this call: 'dropdown'
^ aCanvas jQuery this call: 'dropdown' with: ( Dictionary new
at: 'fullTextSearch' put: 'exact';
yourself )
]

{ #category : #initialization }
Expand Down

0 comments on commit abb1f6e

Please sign in to comment.