You named the exactly reason why I created slim-select so long ago. I wanted to get off of jquery and no one else had a non jquery dropdown select library.
slim select has single select (that is sort of search autocomplete). But for actual "search autocomplete" I would suggest using an approach like this: superails.com/posts/ruby-on-rails-60-hotwire-turbo-streams-autocomplete-search
Why do you wish to add 'node_modules' when this tutorial is using importmap and __not__ npm. Or do you mean that import maps is not good, and esbuild is better ?
Ролик конечно на английском, но комментарий напишу на родном языке. Спасибо тебе за твои труд. Я начинающий в Rails и твои видео решают некоторые мои проблемы по rails 7
I tried to use it in my project with bootstrap installed, but seemed it was broken. The styles doesn't work correctly. Is it necessary to use tailwind and stimulus ?
Do you know if it is possible to add additional information in the form select search? For example first name, last name and email. I tried adding def full_name "#{first_name} + ' ' #{last_name}" end in the User model but I am getting unknow column full_name Thank you.
hello, whoever it is behind Food Tips :) I haven't had the chance to work with searchkick / elastic on commercial projects, so can't do a tutorial on this one... yet! As soon as I have the knowledge, I will
@@SupeRails Thank you for the tip Yaroslav. I've done that. I've followed the video step by step. Something is failing with my slim controller though: Failed to register controller: slim (controllers/slim_controller) SyntaxError: The requested module 'slim-select' does not provide an export named 'default'
i want to use selectAll in my code can you help import { Controller } from "@hotwired/stimulus"; import SlimSelect from "slim-select"; // import 'slim-select/dist/slimselect.css' // Connects to data-controller="slim" export default class extends Controller { connect() { new SlimSelect({ select: this.element, selectAll: true, settings: { disabled: false, hideSelected: false, showOptionTooltips: true, }, }); } }
You named the exactly reason why I created slim-select so long ago. I wanted to get off of jquery and no one else had a non jquery dropdown select library.
wow Brian, so nice to see you here! 🥰🥰🥰
Thanks so much for your great work!
You are a great teacher. Keep it up!
Thanks Muhammad. Your words mean a lot to me and motivate me to keep going!
Thank for a great video. Can i have 1 one question . Does this also work with form.text_field for search autocomplete
slim select has single select (that is sort of search autocomplete).
But for actual "search autocomplete" I would suggest using an approach like this: superails.com/posts/ruby-on-rails-60-hotwire-turbo-streams-autocomplete-search
Thank You for tutorial!
You need 2 steps to success:
1) Add this - Rails.application.config.assets.paths
Why do you wish to add 'node_modules' when this tutorial is using importmap and __not__ npm.
Or do you mean that import maps is not good, and esbuild is better ?
Ролик конечно на английском, но комментарий напишу на родном языке. Спасибо тебе за твои труд. Я начинающий в Rails и твои видео решают некоторые мои проблемы по rails 7
I tried to use it in my project with bootstrap installed, but seemed it was broken. The styles doesn't work correctly.
Is it necessary to use tailwind and stimulus ?
Do you know if it is possible to add additional information in the form select search? For example first name, last name and email. I tried adding def full_name "#{first_name} + ' ' #{last_name}" end in the User model but I am getting unknow column full_name Thank you.
Try “map”. Something like
User.all.map { |u| [u.id, u.full_name] }
@@SupeRails Thank you for the quick response. I tried and I got a syntax error. syntax error, unexpected '}', expecting '.' or &. or :: or '['
Sorry I found my silly error. . Works great now. Thank you so much! Love your videos
@@hsxn_sports maybe User.all.map { |u| [u.id, u.full_name] }
Could I ask you about using a few different SlimSelecControllers(using different settings for different select-inputs)?
What are your thoughts about select2 vs slim-select??
select2 relies on jquery, so I would avoid it. As I said in the video, I try to avoid having jquery in a modern rails app
@@SupeRails Can you please do a vide o on search implementation using searchkick (elasticsearch)
What keyboard do you use in this video? I love the sound. Also great video!
oh its a regular external white apple keyboard
Is it possible to add a tag that is not in the list and create it from the select?
Hey Jean, great question! Yes you can do it. Here is my solution in this blogpost: blog.corsego.com/select-or-create-with-tom-select
@@SupeRails thanks, i'm your fan
Great tutorial
Thanks a lot! Saved me after testing many things :))) keep going!
I do same at all , but i have one problem .. When i go to back page ( th previos page have slim select) , it duble inputs , why coming like this?
Can you please do a vide o on search implementation using searchkick (elasticsearch)
hello, whoever it is behind Food Tips :) I haven't had the chance to work with searchkick / elastic on commercial projects, so can't do a tutorial on this one... yet! As soon as I have the knowledge, I will
Again, useful and great!
Thanks Viktor. I'm glad you found it useful!
TY!!! Nice job.
Awesome and very helpfull, thanks a lot!
does this work with rails 7 and simple_form gem?
Hi Daniele!
For this particular field you would not need to use simple_form's form.input.
Just use the inbuild form.select.
@@SupeRails Thank you for the tip Yaroslav. I've done that. I've followed the video step by step. Something is failing with my slim controller though: Failed to register controller: slim (controllers/slim_controller) SyntaxError: The requested module 'slim-select' does not provide an export named 'default'
@@danielecasal2961 I'm getting this problem too
Im getting this error too when using the version 2.4.0
did you find any solution, I have the same issue with the failed controller
Thank you!
One yer of video but slim select is broken and does not work anymore
Working fine with me. Please check my post above.
is it possible to change the CSS to pick up tailwind style?
I think this is how you can do it: slimselectjs.com/settings#cssClass
@@SupeRails I spent hours but couldn’t get it to change , thanks anyway 👍
@@SupeRails I spent hours but couldn’t get it to change , thanks anyway 👍
Does not work with rails 7 and botstrap 5
What exactly is broken? What error are you getting ? Have you tried with tailwind?
Чудово, дякую!
Slava!
useful video bro : )
👍
i want to use selectAll in my code can you help
import { Controller } from "@hotwired/stimulus";
import SlimSelect from "slim-select";
// import 'slim-select/dist/slimselect.css'
// Connects to data-controller="slim"
export default class extends Controller {
connect() {
new SlimSelect({
select: this.element,
selectAll: true,
settings: {
disabled: false,
hideSelected: false,
showOptionTooltips: true,
},
});
}
}