mQuicksearch
is a Metronic's custom plugin defined in
src/js/framework/components/general/quicksearch.js
.
mQuicksearch
is a Metronic's custom plugin defined in
src/js/framework/components/general/quicksearch.js
.
First parameter is the id, class, or tag of the HTML element. The second parameter is for the options.
var quicksearch = new mQuicksearch('m_quicksearch', options);
var options = {
mode: 'default', //'default/dropdown'
minLength: 1,
maxHeight: 300,
requestTimeout: 200, // ajax request fire timeout in milliseconds
inputTarget: 'm_quicksearch_input',
iconCloseTarget: 'm_quicksearch_close',
iconCancelTarget: 'm_quicksearch_cancel',
iconSearchTarget: 'm_quicksearch_search',
spinnerClass: 'm-loader m-loader--skin-light m-loader--right',
hasResultClass: 'm-list-search--has-result',
templates: {
error: '<div class="m-search-results m-search-results--skin-light"><span class="m-search-result__message">{{message}}</div></div>'
}
};
Field | Type | Description | ||
---|---|---|---|---|
mode |
string |
Quick search mode. Accepted values are
|
||
minLength |
number |
Minimum length of records to be displayed
|
||
maxHeight |
number |
Maximum height of result to be displayed
|
||
requestTimeout |
number |
The timeout in miliseconds for the request
|
||
inputTarget |
string |
The target of input textbox where the search action to be triggered
|
||
iconCloseTarget |
string |
Set the icon for the search close
|
||
iconCancelTarget |
string |
Set the icon for the search cancel
|
||
iconSearchTarget |
string |
Set the icon for the search
|
||
spinnerClass |
string |
Set spinner icon class name to be displayed during search action
|
||
hasResultClass |
string |
Set search result class name when the search has result
|
||
templates.error |
string |
The error template in HTML format, to be displayed when the search result has error.
Add the placeholder
|
Method | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
setDefaults(options) |
Set default options
|
||||||||||||
showResult(response) |
Show the result of the search
|
||||||||||||
showError(message) |
Show the error based of the template error defined in the options.
{{message}} placeholder in the error template will be replaced by the
|
||||||||||||
showProgress() |
Show the search progress bar |
||||||||||||
hideProgress() |
Hide the search progress bar |
||||||||||||
search() |
Trigger search manually |
||||||||||||
on(name, handler) |
Register event
|
||||||||||||
one(name, handler) |
Register event to be run once
|
I run a team of 20 product managers, developers, QA and UX resources. Previously we designed everything ourselves. For our newest platform we tried out Metronic. I cannot overestimate the impact Metronic has had. It's accelerated development 3x and reduced QA issues by 50%. If you add up the reduced need for design time/resources, the increase in dev speed and the reduction in QA, it's probably saved us $100,000 on this project alone, and I plan to use it for all platforms moving forward.
The flexibility of the design has also allowed us to put out a better looking & working platform and reduced my headaches by 90%. Thank you KeenThemes!
Everything within Metronic is customizable globally to provide limitless unique styled projects
Choose a perfect design for your next project among hundreds of demos
A huge collection of components to power your application with the latest UI/UX trands
Enterprise ready Angular 6 integration with built-in authentication module and many more
Metronic deeply customizes Bootstrap with native look and feel
Our super sleek and intuitive Datatable comes packed with all advanced CRUD features
Metronic is the only theme trusted by over 60,000 developers world wide
Lifetime updates with new demos and features is guaranteed
Metronic is writer with a code structure that all developers will be able to pick up easily and fall in love