Closed (fixed)
Project:
Chosen
Version:
7.x-1.0
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
19 Dec 2012 at 11:36 UTC
Updated:
5 Apr 2013 at 18:40 UTC
Given the fix rolled in #1539444 to search for items containing text this is likely made redundant, but we've been frustrated by how Chosen is thrown off by nested/hierarchal taxonomy terms that are prefixed with dashes.
That is search for "Blue" won't match the "-Blue".
Here's a simple update to the module's chosen.js that makes "-blue" "- blue".
Only showing the "$(this).find('option').each(function() {".
$(this).find('option').each(function() {
itemText = $(this).text();
itemText = itemText.replace(/-([^-])/i, "- $1");
$(this).text(itemText);
});
$(this).chosen();
}
No patch attached as more than likely this won't be used.
Comments
Comment #1
shadcn commentedThanks. This is now fixed in the alpha-3.