tom-select
Choices.js
tom-select | Choices.js | |
---|---|---|
6 | 6 | |
1,481 | 6,005 | |
3.6% | 0.8% | |
7.6 | 0.0 | |
27 days ago | about 2 months ago | |
JavaScript | TypeScript | |
Apache License 2.0 | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
tom-select
- Tom-select: vanilla JavaScript select control
-
Glam Up My Markup Contest Submission | Special Effects with backdrop-filter() ✨
This project uses Tom Select, which is licensed under the Apache License, Version 2.0. Tom Select on GitHub Apache License 2.0
-
A comprehensive guide to multi-timezone support in Django
Tip: If you're displaying a long list of timezones, consider using a select element with a search feature(e.g, tom-select) for a better user experience.
-
Hide an API Key from JS code
sorry if it's a dumb question. I'm using tom-select.js (https://tom-select.js.org/) to create various (s) that can use an ajax API call to retrieve/search for options. Since I have to use my own APIs that need an api key, is there a way to protect this key that could be used to access other APIs as well? Thank you
-
How to use tomselect to create and edit a "belongs_to :many relation" with Ruby on Rails
import { Controller } from "@hotwired/stimulus" import { get } from '@rails/request.js' import TomSelect from "tom-select" // Connects to data-controller="search" export default class extends Controller { static values = { url: String, selected: String } connect() { this.element.setAttribute( "autocomplete", "off" ); if (this.selectedValue == 'null') { var selected_json_data = new Array() var selected_items_array = new Array(); } else { var selected_json_data = JSON.parse(this.selectedValue) var selected_items_array = new Array() for(let i = 0; i < selected_json_data.length; i++) { selected_items_array.push(selected_json_data[i].id) } } var config = { plugins: ['clear_button', 'remove_button'], shouldLoad:function(q){ return q.length > 2; }, render: { option: this.render_option, //item: this.render_option item: function(data, escape) { return `${escape(data.email_address)}` } }, loadThrottle: 300, // check this out in search items reload new data-> // https://github.com/orchidjs/tom-select/issues/78 // https://stackoverflow.com/questions/74622800/fetching-data-from-api-to-create-tom-select-options maxItems: 10, maxOptions: 10, valueField: 'id', labelField: 'email_address', searchField: ['email_address', 'first_name', 'last_name'], options: selected_json_data, items: selected_items_array, sortField: { field: "email_address", direction: "asc" }, create: false, load: (q, callback) => this.search(q, callback), } let this_tom_select = new TomSelect(this.element, config) this_tom_select.clearCache() } async search(q, callback) { const response = await get(this.urlValue, { query: { q: q }, responseKind: 'json' }) if(response.ok) { callback(await response.json) } else { callback() } } render_option(data, escape) { if(data.email_address) return ` ${escape(data.first_name)} ${escape(data.last_name)} | ${escape(data.email_address)}
- Tom-select.js: vanilla JavaScript select control
Choices.js
- Rails 7 SelectBox with Search
-
How does jQuery class selector return an object?
bootstrap-select is a jQuery plugin, thus it needs jQuery as a dependency. If you can’t use jQuery, you need something similar to bootstrap-select without dependencies (also called Vanilla JS). https://choices-js.github.io/Choices/ or https://tom-select.js.org/ might work for you.
-
Looking for a library similar to select2 but without jquery requirement
You may check the https://github.com/Choices-js/Choices library.
-
Customize select with vanilla JavaScript
If this approach does not suit you, then you need to make your own. There are ready-made solutions: — Select2 in jQuery; — Chosen in jQuery; — Choices in JavaScript without deps.
-
Rails7, Choices.js, importmap-rails, stimulus-rails got "does not provide an export named default" error
I want to implement Choices.js on Rails7 with importmap, stimulus but got error like below.
- Selectra - A custom select box in vanilla JS
What are some alternatives?
vue-multiselect - Universal select/multiselect/tagging component for Vue.js
select2 - Select2 is a jQuery based replacement for select boxes. It supports searching, remote data sets, and infinite scrolling of results.
jQuery-Selectric - jQuery plugin for easy manipulation and customization of HTML selects
selectize.js - Selectize is the hybrid of a textbox and <select> box. It's jQuery based, and it has autocomplete and native-feeling keyboard navigation; useful for tagging, contact lists, etc.
Slim Select - Slim advanced select dropdown
JavaScript-autoComplete - An extremely lightweight and powerful vanilla JavaScript completion suggester.
bootstrap-select - :rocket: The jQuery plugin that brings select elements into the 21st century with intuitive multiselection, searching, and much more.
laravel-simple-select - Laravel Simple Select inputs component for Blade and Livewire.
react-select-search - ⚡️ Lightweight select component for React
chosen - Deprecated - Chosen is a library for making long, unwieldy select boxes more friendly.
multiselect - Vue 3 multiselect component with single select, multiselect and tagging options (+Tailwind CSS support).
typeahead.js - typeahead.js is a fast and fully-featured autocomplete library