@progress/kendo-vue-grid
Version:
51 lines (50 loc) • 1.31 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 { defineComponent as l, createVNode as n } from "vue";
import { Keys as m, Icon as c } from "@progress/kendo-vue-common";
const u = /* @__PURE__ */ l({
props: {
title: String,
iconClass: String,
icon: String,
svgIcon: Object,
selected: Boolean,
onMenuitemclick: Function
},
methods: {
onClick(e) {
this.$emit("menuitemclick", e);
},
onKeyDown(e) {
e.keyCode === m.enter && this.$emit("menuitemclick", e);
}
},
render() {
const {
title: e,
iconClass: o,
selected: s,
icon: i,
svgIcon: t
} = this.$props;
return n("div", {
tabindex: 0,
onKeydown: this.onKeyDown,
onClick: this.onClick,
class: `k-columnmenu-item ${s ? "k-selected" : ""}`
}, [o && n(c, {
class: o
}, null), (i || t) && n(c, {
name: i,
icon: t
}, null), e]);
}
});
export {
u as GridColumnMenuItem
};