@progress/kendo-vue-grid
Version:
9 lines (8 loc) • 1.57 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
*-------------------------------------------------------------------------------------------
*/
;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),e=require("@progress/kendo-vue-common"),n=o.defineComponent({name:"KendoGridNav",props:{currentData:Array},inject:{onNavKeyDown:{default:e.noop},onNavFocus:{default:e.noop},onNavMount:{default:e.noop},handleDispatchFocus:{default:e.noop},kbContext:{default:null},navigation:{default:null}},mounted(){this.onNavMount({scope:this.$el||void 0})},updated(){this.onNavMount({scope:this.$el||void 0})},methods:{onKeyDown(t){this.onNavKeyDown(t,{navigation:this.navigation,kbContext:this.kbContext,onNavigationAction:this.onNavigationAction}),this.$emit("keydown",{dataItems:this.getLeafDataItems(),componentId:this._gridId,selectedField:this.$props.selectedField,event:t})},onFocus(t){this.onNavFocus(t,{kbContext:this.kbContext})},onNavigationAction(t){this.$emit("navigationaction",{focusElement:t.focusElement,event:t.event})},getLeafDataItems(){return this.$props.currentData.filter(t=>t.rowType==="data").map(t=>t.dataItem)}},render(){const t=e.getDefaultSlots(this);return o.createVNode("div",{onKeydown:this.onKeyDown,onFocusin:this.onFocus,"data-keyboardnavscope":!0},[t])}});exports.GridNav=n;