mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Add new options: group_search, hide_results_on_select, rtl Activate `strictNullChecks` Remove colon after `@default` Add jsDoc to `on` and `trigger` function Add line return before jsDoc first line Remove all exception rules to tslint (unified-signatures, max-line-length)
34 lines
693 B
TypeScript
34 lines
693 B
TypeScript
// Options
|
|
$(".my_select_box").chosen();
|
|
|
|
$(".my_select_box").chosen({});
|
|
|
|
$(".my_select_box").chosen({
|
|
disable_search_threshold: 10,
|
|
max_selected_options: 5,
|
|
no_results_text: "Oops, nothing found!",
|
|
width: "95%"
|
|
});
|
|
|
|
$(".chosen-select").chosen({
|
|
rtl: true
|
|
});
|
|
|
|
// Destroy
|
|
$(".my_select_box").chosen("destroy");
|
|
|
|
// Triggered Events
|
|
$(".my_select_box").on("change", (evt, params) => {
|
|
evt.preventDefault();
|
|
const s: string = params.selected;
|
|
const d: string = params.deselected;
|
|
console.log(s, d);
|
|
});
|
|
|
|
$(".chosen-select").on("chosen:maxselected", () => {
|
|
alert("Max selected");
|
|
});
|
|
|
|
// Triggerable Events
|
|
$(".my_select_box").trigger("chosen:updated");
|