@progress/kendo-react-grid
Version:
React Data Grid (Table) provides 100+ ready-to-use data grid features. KendoReact Grid package
36 lines (35 loc) • 1.54 kB
JavaScript
/**
* @license
*-------------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the package root for more information
*-------------------------------------------------------------------------------------------
*/
import { TextBox as h, InputPrefix as g } from "@progress/kendo-react-inputs";
import * as o from "react";
import { GridContext as f } from "./utils/GridContext.mjs";
import { searchIcon as x } from "@progress/kendo-svg-icons";
import { classNames as d, SvgIcon as C } from "@progress/kendo-react-common";
import { useGridState as p } from "./GridState.mjs";
import { getStringFromSearch as u } from "@progress/kendo-react-data-tools";
import { useLocalization as S } from "@progress/kendo-react-intl";
import { searchboxPlaceholder as r, messages as z } from "./messages/index.mjs";
const L = (e) => {
const a = S(), n = o.useContext(f), [c] = p(), i = (t) => {
n.searchChange(t), e.onChange && e.onChange.call(void 0, t);
}, m = u(c.search), s = d("k-grid-search", "k-searchbox", e.className), l = a.toLanguageString(r, z[r]);
return /* @__PURE__ */ o.createElement(
h,
{
placeholder: l,
value: m,
prefix: () => /* @__PURE__ */ o.createElement(g, { orientation: "horizontal" }, /* @__PURE__ */ o.createElement(C, { icon: x })),
...e,
className: s,
onChange: i
}
);
};
export {
L as GridSearchBox
};