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