mirror of
https://github.com/zulip/zulip.git
synced 2026-06-30 21:11:04 +08:00
This commit adds an explicit "input-close-filter-button" classname to the filter input clear button, improving the readability of the code.
12 lines
291 B
TypeScript
12 lines
291 B
TypeScript
import $ from "jquery";
|
|
|
|
$("body").on(
|
|
"click",
|
|
".filter-input .input-close-filter-button",
|
|
function (this: HTMLElement, _e: JQuery.Event) {
|
|
const $input = $(this).prev(".input-element");
|
|
$input.val("").trigger("input");
|
|
$input.trigger("blur");
|
|
},
|
|
);
|