question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Customize select dropdown to have a search box

See original GitHub issue

Category : Help Request/Question:

Hi Tabalinas,

During insert of a new item, I want to show a search box in the select dropdown as there may be many values. I tried to customize the default select and use the bootstrap-select for live search (using selectpicker class). My modified code is like this

    insertTemplate: function(value, item) {
	var $select = jsGrid.fields.select.prototype.insertTemplate.call(this);
	$select.addClass('selectpicker');
	$select.attr("data-live-search", "true");
	/*$select.selectpicker({
	liveSearch: true
	});	*/		             		
	$select.selectpicker('refresh');
	$select.selectpicker('render');
	
	return $select;
}			

But nothing gets rendered for this field. Could you let me know how to achieve this Thanks in advance Uma

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
umav-123commented, Jun 20, 2017

Hi Tabalinas, Thank you so much. That fixed the issue. Really appreciate your putting efforts to provide resolutions

0reactions
tabalinascommented, Jun 25, 2017

@umav-123, you are welcome!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Creating a select box with a search option - Stack Overflow
This simple code worked for me. <input list="brow"> <datalist id="brow"> <option value="Internet Explorer"> <option value="Firefox"> <option ...
Read more >
Custom Select Dropdown With Search Box - Amsifyselect.js
How to use it: · 1. Load the stylesheet 'amsify. · 2. To make options searchable, add the 'searchable' attribute to your HTML...
Read more >
How TO - Search/Filter Dropdown - W3Schools
Learn how to search for items in a dropdown menu with CSS and JavaScript. ... The search field (#myInput) is styled to fit...
Read more >
Bootstrap Select dropdown with search - free examples & tutorial
Responsive Select dropdown with search built with Bootstrap 5. Helps you find the options you are looking for by searching.
Read more >
How to Create a Custom Select Dropdown using HTML, CSS ...
The HTML. Traditionally, when you need to create a custom select dropdown, you would use the following structure. <select> <option value= ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found