@progress/kendo-react-grid
Version:
React Data Grid (Table) provides 100+ ready-to-use data grid features. KendoReact Grid package
78 lines (77 loc) • 2.38 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 { DropDownList as i } from "@progress/kendo-react-dropdowns";
import { Input as C, NumericTextBox as d } from "@progress/kendo-react-inputs";
import { DatePicker as f } from "@progress/kendo-react-dateinputs";
import { cellOperatorChange as E, cellInputChange as s, cellBoolDropdownChange as v } from "../filterCommon.mjs";
const w = (e) => {
const u = () => {
if (e.filterType === "boolean")
return;
const n = e.operators.find((r) => r.operator === e.operator) || null;
return /* @__PURE__ */ o.createElement(i, { value: n, onChange: m, data: e.operators, textField: "text" });
}, l = (n, r) => {
s(n, r, e);
}, m = (n) => {
E(n, e.value, e.onChange);
}, h = (n) => {
v(n, e.onChange);
}, g = (n, r, c) => {
switch (n) {
case "numeric":
return /* @__PURE__ */ o.createElement(
d,
{
value: r,
onChange: (t) => {
l(t.value, t.syntheticEvent);
},
rangeOnEnter: !1
}
);
case "date":
return /* @__PURE__ */ o.createElement(
f,
{
value: r,
onChange: (t) => {
l(t.value, t.syntheticEvent);
}
}
);
case "boolean": {
const t = (a) => a == null;
return /* @__PURE__ */ o.createElement(
i,
{
onChange: h,
value: c.find((a) => a.operator === (t(r) ? "" : r)),
data: c,
textField: "text"
}
);
}
default:
return /* @__PURE__ */ o.createElement(
C,
{
value: r || "",
onChange: (t) => {
l(t.target.value, t.syntheticEvent);
}
}
);
}
};
return /* @__PURE__ */ o.createElement(o.Fragment, null, u(), g(e.filterType, e.value, e.booleanValues));
};
export {
w as GridColumnMenuFilterCell
};