Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for longer chained Value attribute #83

Open
hijoem opened this issue Aug 28, 2021 · 0 comments
Open

support for longer chained Value attribute #83

hijoem opened this issue Aug 28, 2021 · 0 comments

Comments

@hijoem
Copy link

hijoem commented Aug 28, 2021

This is a really great plugin 👍 but it's a shame that it seems no more maintained.

In example given, value attribute was only 1 word while in my code there are more.

So my code was like these ( I'm using bootstrap v.4.60 | jquery 3 | jquery.chained v2.0.0-beta.3 ):
parent:
<option value="Spesialis Penyakit Dalam">Spesialis Penyakit Dalam</option>
child:
<option value="dr. Maizena Tepung Kanji, SpPD-KGH ( Spesialis Penyakit Dalam )" data-chained="Spesialis Penyakit Dalam">

I spent 2 hours reading docs, browsing, then doing some console.log()s
to figure it out that I only need to edit line 80 in jquery.chained.js :
from matches = data.split(" ");
to matches = data;

That's all.

I don't know what impacts it will bring to other codes, but it worked like a charm for me without any issue.

I hope it will help someone out there 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant