Questions tagged [tom-select]

48 questions
4
votes
3 answers

change value of tom select after rendering it

I'm working on an update function that uses tom-select (https://tom-select.js.org/). The process goes as follows: 1- the user clicks on the edit button 2- a bootstrap modal will open and the data of the selected row will show so he can update…
3
votes
1 answer

How to customize the placeholder text using the Tom Select Javascript UI

My goal is to change the font of the placeholder text in for the select fields for the dance styles and event types, both are using the Tom Select JS UI for the select dropdowns. Through the Tom Select site I was able to find this: .ts-wrapper…
Ogarocious
  • 119
  • 6
2
votes
1 answer

Hot to disabled the (not so)intelligent remote load caches in Tom-Select

I need to show different select lists on a tom-select depending on if the search box is empty or not. But tom-select is not calling the load function if you remove all characters in the search box. To make it a little bit clearer: When you open the…
Thallius
  • 2,482
  • 2
  • 18
  • 36
2
votes
1 answer

Rails tom-select how to keep selected value in edit form?

I have a tom-select field works fine with an ajax search. When I select the record to edit the form it does not display any value of what was selected as the location. I am trying to set the default field but nothing has allowed me to have any value…
spacerobot
  • 265
  • 1
  • 5
  • 23
2
votes
1 answer

Rails 7 JavaScript event listeners stop working after browser back?

I have rails 7 app where I'm trying to build a search bar using either tom-select or slim-select. My issue reproduces no matter which library I'm using therefore it must be the issue on my rails side. app/views/cities/index.html.erb <%= form_for…
2
votes
2 answers

Tom-select with bootstrap 5 theme differs visually from bootstrap 5.1.3 styled select

Premise In order to display selects the same on Windows, Linux and Mac, in my project, i am using combination of: tom-select v2.0.1 JavaScript library; Bootstrap v5.1.3 frontend framework; Symfony v5.4.5 backend framework. I have set up SCSS files…
Rikijs
  • 728
  • 1
  • 12
  • 48
2
votes
2 answers

Tom-Select (or Selectize.js) Remote data for Option Groups

I am trying to use remote data for tom-select (https://tom-select.js.org/examples/optgroups/). I am at a loss how to configure option groups with remote data. I have the select loading with remote data like this: "optgroup": "1 Materials | 1.2…
Dan Tappin
  • 2,692
  • 3
  • 37
  • 77
1
vote
1 answer

Tom-select created record doesn't update the dropdown options (Rails / Stimulus)

I'm using tom-select in my rails app (with Stimulus) to create a 'Vendor' model record on the fly in order to then select it in the dropdown of my 'Trx' model. I can get the fetch request to create the record but my drop down does not update.…
chug
  • 71
  • 6
1
vote
0 answers

How to set default selected value in UX Symfony dropdown

I managed to implement dropdown with UX Symphony using custom Autocompleter following the documentation. namespace App\Autocompleter; class FooAutocompleter implements EntityAutocompleterInterface { ... } I add this view :