Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
It would be awesome if there was an admin option to force chosen to search from the beginning of a string.
The jquery chosen module has a setting "enable_split_word_search" which we can disable to achieve this functionality.
Comment | File | Size | Author |
---|---|---|---|
#9 | d8-search-beginning-string-2166799-9.patch | 3.36 KB | mr.york |
| |||
#4 | search-beginning-string-2166799-4.patch | 1.77 KB | mr.york |
| |||
#2 | search-beginning-string-2166799-2.patch | 1.78 KB | Den Tweed |
#1 | search-beginning-string-2166799-1.patch | 2.33 KB | jamesdixon |
Comments
Comment #1
jamesdixon CreditAttribution: jamesdixon commentedHere is a patch we used to achieve this functionality. You can check "Searches from start of string only" from admin/config/user-interface/chosen, and the jquery chosen will be configured to search options from the beginning of the string only.
Comment #2
Den Tweed CreditAttribution: Den Tweed at Coworks.be commentedNeeded this functionality but patch didn't apply anymore so made a new one, only the changes in the js file were not needed anymore
Comment #4
mr.york CreditAttribution: mr.york at Agence Inovae commentedReroll last patch.
Comment #9
mr.york CreditAttribution: mr.york at Agence Inovae commentedDrupal 8 patch.
Comment #10
mr.york CreditAttribution: mr.york at Agence Inovae commentedComment #12
nagy.balint CreditAttribution: nagy.balint commentedI cant see any difference with this option on or off.
Can someone provide reproduction steps?