@progress/kendo-react-treelist
Version:
React TreeList enables the display of self-referencing tabular data. KendoReact TreeList package
49 lines (48 loc) • 1.6 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 * as t from "react";
import { DatePicker as c } from "@progress/kendo-react-dateinputs";
import { useTableKeyboardNavigation as m } from "@progress/kendo-react-data-tools";
import { TREELIST_COL_INDEX_ATTRIBUTE as r } from "../../constants/index.mjs";
import { classNames as f, getNestedValue as o } from "@progress/kendo-react-common";
const s = (e) => {
const i = t.useCallback(
(l) => {
e.onChange && e.onChange({
dataItem: e.dataItem,
level: e.level,
field: e.field,
syntheticEvent: l.syntheticEvent,
value: l.value
});
},
[e.onChange, e.dataItem, e.level, e.field]
), d = m(e.id), n = f(
{
"k-selected": e.isSelected
},
e.className
), a = /* @__PURE__ */ t.createElement(
"td",
{
style: e.style,
className: n,
"aria-colindex": e.ariaColumnIndex,
"aria-selected": e.isSelected,
role: "gridcell",
...d,
[r]: e.colIndex
},
/* @__PURE__ */ t.createElement(c, { width: "100%", value: o(e.field, e.dataItem), onChange: i })
);
return e.render ? e.render.call(void 0, a, e) : a;
};
s.displayName = "KendoReactTreeListDateEditor";
export {
s as TreeListDateEditor
};