brianvoe / slim-select

Slim advanced select dropdown
http://slimselectjs.com
MIT License
1.03k stars 195 forks source link

Multilangual options search [wanted feature] #548

Closed crustamet closed 3 months ago

crustamet commented 3 months ago

Hello, i kinda like this slim select 2.0 js library.

I really don't know if this feature is implemented but

i have a <select> with country names but i have in multiple languages, so for example "Germany" when i search this with this library it goes right but i want to search for "Deutschland" so it will return the option Germany, is this possible to implement ?

the select2 jquery library does this but it is just a bloatware from my perspective i would love to switch to this slim select.

it works by adding a label param to the option like this so it will search for the label on each option as a string without it being multiple parameters, and i hope it supports diacritics also and maybe a right to left text and a left to right text like Arab, Muslims 🙉

<option label="Deutschland, Germany, Germania, etc..">Germany</option>

or sure i could extend the search event, but i would like it to see implemented as a core feature

Thanks 👯

brianvoe commented 3 months ago

Im glad you kinda like it.

You can just write your own search. https://slimselectjs.com/events#search

If someone searches Deutschland then return whatever options/optgroups you want to show

crustamet commented 3 months ago

Well after 20 hours of work with this slim, i just wanted some features that actually make this library better, after 20 hours of work with this library, i've started searching the issues sections, so many of them that I encountered, on all "features requests" that are actually bugs from my perspective the guy who made this library refused to implement and fix issues.

So now i am back to select2, i hate that it is dependent on jquery but still that is the best select out there, fully featured.

brianvoe commented 3 months ago

HAHA what? First of all you are talking to the creator of slim select. Good luck talking to anyone at select2.

Give me an "issue" you think I refused to fix. I also guess you have never looked at the issues at select 2 github cause they are at 94 issues. slim select has 9. who is refusing to fix stuff?

Just because I dont build out a label searching which makes no sense. Who types into a select dropdown one value and expects to see a completely different list of values. Thats just bad design.

Why would it take 20 hours to implement your own search? If they type in certain values return a certain list. Seems pretty simple to me and I dont have to implement a label search feature for 1 guy that thinks its a good idea.

Actually dont use slim select. Youve wasted my time more than I care to deal with.

crustamet commented 3 months ago

it didn't took 20 hours to implement the search, it took me 20 hours to to customize the god damn slim select with bootstrap 5, after that i had to implement RTL and LTR so that took some time and then after all of this i had to display a html option style, after i made the select with html, i found out there was no support for internationalization meaning, no support for multilangual texts, that was a bummer, so then i had to make those files myself... i had to modify the core library.. and that is not good.

Why people search for "Deutschland" to have the select option as Germany, because it is the same name but in different language LOL. how this works ? something like this:

You have a multilangual website that supports let's say "english" and "deutsch". Now for some whatever reason a guy from germany visits the website and it reached on the english page, here then are two options

  1. If he translate the page using the web core from the browser with google translate, then the options going to be translated, but in the original time when the slim is loaded, it was loaded in english, now you have to type Germany so it gives you the option "Deutschland".
  2. If he doesn't translate the page then maybe he search something for the germany, but for him he knows he want to search for "Deutschland" so the Germany option never pops off.

Don't mind me, keep denying people for feature requests using this,

Now, for sure select2 has more found bugs because it is used by more people, and of course you have 9 issues because you closed mine with a reason that you do not even understand.

After refactor my code with select2, everything worked perfectly in like 1 hour of work. The only problem with select2 it is using jQuery a shitty bloatware from my perspective.

brianvoe commented 3 months ago

Your the issue with open source projects. Want, want, want. "My feature is important and you should build it". Its called Slim Select. It was suppose to be a lightweight alternative to a jquery select. Everyone wants to add more stuff and I have to figure out if what they are asking makes and if it can be done. Now you want me to add multilingual and diacritics. That for sure will keep SLIM SELECT slim.

How about submit a pr. Show effort in contributing to project and not just complaining it doesnt have the feature you want. People who maintain open source projects dont spend day and night building free things for lazy people. I contribute and maintain multiple open source project that thousands of people use and appreciate. You contribute nothing and complain.

crustamet commented 3 months ago

lol, you don't have to load the language if you dont use it, if you dont use it it's still slim :)

its just extending the core class itself.

and by the way it is already slim because its not using any jquery

brianvoe commented 3 months ago

submit a pr