zulip/web/src/inputs.ts
Sayam Samal 122d93d430 filter_input: Add explicit classname for filter clear button.
This commit adds an explicit "input-close-filter-button" classname to
the filter input clear button, improving the readability of the code.
2025-07-21 23:16:26 -07:00

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");
},
);