@progress/kendo-react-dropdowns
Version:
React DropDowns offer an interface for users to select different items from a list and more. KendoReact Dropdowns package
48 lines (47 loc) • 1.58 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 { Chip as u } from "@progress/kendo-react-buttons";
const v = (o) => o.syntheticEvent.preventDefault(), f = (o) => o.syntheticEvent.stopPropagation();
class g extends t.Component {
render() {
const { data: n, guid: r, focused: s, tagRender: c, tag: i, onTagDelete: l, size: m } = this.props;
return /* @__PURE__ */ t.createElement(t.Fragment, null, n.map((e, p) => {
const a = i ? /* @__PURE__ */ t.createElement(
i,
{
key: e.text + p,
tagData: e,
guid: r,
focusedTag: s,
onTagDelete: l
}
) : /* @__PURE__ */ t.createElement(
u,
{
id: `tag-${r}-${e.text.replace(/\s+/g, "-")}`,
"aria-selected": !0,
role: "option",
"aria-setsize": n.length,
key: e.text + p,
text: e.text,
removable: !0,
onRemove: (d) => l.call(void 0, e.data, d.syntheticEvent),
onMouseDown: v,
onClick: f,
className: e === s ? "k-focus" : void 0,
size: m
}
);
return c ? c(e, a) : a;
}), this.props.children);
}
}
export {
g as default
};