JSFiddle - React, Tailwind, and code Playground

by Salmin Skenderovic

HTML

<input type="search" id="test" />

JavaScript

$("#test").on('search', function () {
    alert("hej");
    // this function will be executed on click of X (clear button)
});