harvesthq / chosen

Deprecated - Chosen is a library for making long, unwieldy select boxes more friendly.
http://harvesthq.github.io/chosen/
Other
21.85k stars 4.1k forks source link

Chosen Widget not recognizing Macron characters for Maori words so unable to search for Nga and Ngā #3136

Closed Princeknz closed 2 years ago

Princeknz commented 2 years ago

Summarize your issue here.

When using the Chosen Widget for ethnicity and Iwi selection in New Zealand we are unable to search for words with a Macron and have it return word with A, Ā, a and ā in the results.

Tell us how to reproduce this issue.

  1. Setup data with German and Māori as options

  2. Search for Ma this should return German and Māori as options to select.

  3. This happen in School names and Iwi within New Zealand

Additionally, please link to a working demo that shows the issue so we can attempt to reproduce. You can use this template as a base. Alternatively, confirm that the Chosen demo page shows the issue.

As the change is not in our live system we cannot give access to our dev environment, happy to supply screen shots on request

Expected behavior

When doing a search on the Widget it should return words that contain the macron letter as well as the non macron letter, e.g. ā and a

Actual behavior

Currently you have to search on a or ā and only get the exact matching results.

Environment

Additional information

Any other information you want to share that is relevant to the issue being reported. This might include the lines of code that you have identified as causing the bug, or potential solutions and workarounds.

tjschuck commented 2 years ago

This is a duplicate of https://github.com/harvesthq/chosen/issues/536, which has a lot more info and a few workarounds you can check out.

You can also try using this branch: https://github.com/harvesthq/chosen/pull/2618