@progress/kendo-react-data-tools
Version:
Includes React Pager & React Filter component, an intuitive interface to create complex filter descriptions. KendoReact Data Tools package
50 lines (49 loc) • 1.44 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
*-------------------------------------------------------------------------------------------
*/
"use client";
import * as o from "react";
import r from "prop-types";
import { TextBox as n } from "@progress/kendo-react-inputs";
import { provideLocalizationService as l, registerForLocalization as p } from "@progress/kendo-react-intl";
import { filterTextFilterAriaLabel as a, messages as c } from "../../messages/index.mjs";
const i = class i extends o.Component {
constructor() {
super(...arguments), this.onChange = (e) => {
this.props.onFilterChange.call(void 0, {
nextFilter: { ...this.props.filter, value: e.value }
});
};
}
/**
* @hidden
*/
render() {
const e = l(this), {
ariaLabel: s = e.toLanguageString(a, c[a])
} = this.props;
return /* @__PURE__ */ o.createElement(
n,
{
value: this.props.filter.value || "",
onChange: this.onChange,
"aria-label": s,
tabIndex: -1
}
);
}
};
i.propTypes = {
filter: r.object.isRequired,
onFilterChange: r.func.isRequired,
ariaLabel: r.string
};
let t = i;
p(t);
export {
t as TextFilter
};