Registry / web-framework / slickgrid-vue

slickgrid-vue

JSON →
library10.5.0jsnpmunverified

Slickgrid-Vue is a dedicated Vue 3 component that wraps the core functionalities of Slickgrid-Universal, a TypeScript-written, framework-agnostic data grid library. It provides a comprehensive set of features, including various editors, filters, extensions, and services, enhancing the classic SlickGrid experience for modern Vue applications. The library is currently stable at version 10.5.0, with minor releases typically occurring every 2-4 weeks and major releases, such as v10.0.0, approximately annually. Key differentiators include its extensive suite of optional backend services (OData, GraphQL, and a newly introduced SQL Backend Service), robust export capabilities (Excel, PDF), and strong TypeScript support, making it suitable for complex enterprise-grade data visualization and manipulation within the Vue ecosystem. It aims to offer a highly configurable and performant data table solution, capable of handling large datasets efficiently.

npm install slickgrid-vue
INSTALL
IMPORT
SIG · SLICKGRID-VUE
S
slickgrid-vue
web-frameworkjavascriptv10.5.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

SlickgridVue
import { SlickgridVue } from 'slickgrid-vue';
const SlickgridVue = require('slickgrid-vue');
Slickgrid-Vue is an ES Module-first library. Use named `import` for the component. CommonJS `require` is not supported for modern Vue 3 components.
Column, GridOption
import { type Column, type GridOption } from 'slickgrid-vue';
import { Column, GridOption } from 'slickgrid-vue';
These are TypeScript interfaces/types. Best practice in modern TypeScript/ESM projects is to use `import type` to clearly distinguish type-only imports, preventing runtime bundling of non-existent values.
Slickgrid-Vue Styles
import 'slickgrid-vue/dist/styles/css/slickgrid-theme-default.css';
Import the default CSS theme or any other provided themes (e.g., `slickgrid-theme-bootstrap.css`) in your main application file or component. Customization is also possible with SASS.

This quickstart demonstrates rendering a basic Slickgrid-Vue data table component with defined columns, a dataset, and essential grid configurations using the Vue 3 Composition API. It includes basic sorting, filtering, and pagination.

<script setup lang="ts"> import { ref, type Ref } from 'vue'; import { type Column, type GridOption, SlickgridVue } from 'slickgrid-vue'; interface User { id: number; // SlickGrid typically expects an 'id' field firstName: string; lastName: string; age: number; } // It could also be `Column<User>[]` const columns: Ref<Column<User>[]> = ref([ { id: 'firstName', name: 'First Name', field: 'firstName', sortable: true, minWidth: 100 }, { id: 'lastName', name: 'Last Name', field: 'lastName', sortable: true, minWidth: 100 }, { id: 'age', name: 'Age', field: 'age', type: 'number', sortable: true, minWidth: 80 }, ]); const options = ref<GridOption>({ enableAutoResize: true, enableColumnPicker: true, enableGridMenu: true, enablePagination: true, pagination: { pageSizes: [10, 25, 50], pageSize: 10 }, enableFiltering: true, enableSorting: true, gridId: 'my-vue-grid', datasetIdPropertyName: 'id' // Essential for data keying }); const dataset = ref<User[]>([ { id: 1, firstName: 'John', lastName: 'Doe', age: 20 }, { id: 2, firstName: 'Jane', lastName: 'Smith', age: 21 }, { id: 3, firstName: 'Peter', lastName: 'Jones', age: 35 }, { id: 4, firstName: 'Alice', lastName: 'Williams', age: 28 }, { id: 5, firstName: 'Robert', lastName: 'Brown', age: 42 }, ]); // Add a few more rows for better demonstration of pagination/scrolling for (let i = 6; i <= 25; i++) { dataset.value.push({ id: i, firstName: `First${i}`, lastName: `Last${i}`, age: 20 + (i % 30) }); } </script> <template> <div class="my-grid-container" style="height: 500px; width: 100%;"> <slickgrid-vue grid-id="grid1" v-model:columns="columns" v-model:dataset="dataset" v-model:grid-options="options" ></slickgrid-vue> </div> </template> <style> @import 'slickgrid-vue/dist/styles/css/slickgrid-theme-default.css'; .my-grid-container { border: 1px solid #ccc; } </style>
Debug
Known issues
breakingVersion 10.0.0 introduced significant breaking changes. Projects upgrading from v9.x or earlier will require migration steps.
fix
Refer to the specific 'Migration Guide 10.0' available in the Slickgrid-Universal documentation for your framework (e.g., Slickgrid-Vue Migration Guide 10.0) to understand and apply necessary code changes.
affects: >=10.0.0
deprecatedThe `optionItems` list within Menu Options has been deprecated and is scheduled for removal in v11.
fix
Avoid using `optionItems` in Menu Options. Re-evaluate menu customization using alternative configuration methods or `commandListBuilder` where applicable.
affects: >=10.3.0
deprecatedThe `columnSort` property in ColumnPicker/GridMenu has been deprecated in favor of the more flexible `columnListBuilder`.
fix
Transition to using the new `columnListBuilder` for advanced column manipulation and sorting features.
affects: >=10.2.0
gotchaCSS styling fixes and potential theme changes introduced in v10.3.0 may impact custom CSS overrides or existing themes.
fix
After upgrading, carefully review your application's styling. Adjust any custom CSS that might conflict with the updated default themes or internal styling changes.
affects: >=10.3.0
breakingSlickgrid-Vue (and its underlying Slickgrid-Universal) requires Vue.js version 3.5.0 or higher.
fix
Ensure your project's `vue` dependency is updated to `^3.5.0` or later. Older Vue 3 versions or Vue 2 are not supported.
affects: <3.5.0 (Vue)
Errors
Common errors & fixes
TypeError: Cannot read properties of undefined (reading 'registerPlugin')
This error typically means a required SlickGrid plugin or an extension from Slickgrid-Universal was not properly imported, initialized, or provided in the grid options.
fix
Verify that all necessary plugins and extensions (e.g., `RowSelectionExtension`, `CellEditingExtension`) are imported and correctly included in `gridOptions.externalResources` or `gridOptions.plugins` as per the documentation.
Failed to resolve component: slickgrid-vue
The `SlickgridVue` component was not correctly imported or registered within the Vue application or the parent component.
fix
Ensure `import { SlickgridVue } from 'slickgrid-vue';` is present in your component's script section (especially in `<script setup>`) and that Vue can resolve it. If using Options API, ensure it's listed in the `components` option.
SyntaxError: Named export 'SlickgridVue' not found. The requested module 'slickgrid-vue' is a CommonJS module, which may not support all module.exports as named exports.
Attempting to use `require()` or incorrect named `import` syntax for a library primarily distributed as ES Modules in a modern Vue 3/TypeScript environment.
fix
Use ES Module `import` syntax: `import { SlickgridVue } from 'slickgrid-vue';`. Ensure your build tool (e.g., Vite) is configured for ESM. If encountering issues with `import type` for interfaces, ensure your TypeScript configuration and build process support it.
Property 'id' is missing in type 'YourDataType' but required in type 'Column'.
A mismatch exists between the structure of your dataset objects and the expected type definitions for `Column` or other Slickgrid-Vue interfaces, often concerning the primary key `id` or `field` properties.
fix
Ensure your dataset objects (`User` in the quickstart) contain a unique `id` property (or specify `datasetIdPropertyName` in `GridOption` if using another key). Verify that `Column` definitions accurately reflect your data's fields and types, and use `import type` for clarity with interfaces.
Cannot read properties of undefined (reading 'alwaysShowVerticalScroll')
This can occur when SlickGrid has difficulty calculating column widths, especially with CSS styles like `overflow-y: scroll` on the grid container, causing visual misalignments or rendering issues.
fix
If experiencing column width problems or scrollbar collisions, try setting `gridOptions.alwaysShowVerticalScroll = true` to force the scrollbar to always be present, which can help with layout calculations.
Upgrade
Version history
10.5.0latest on npm
Audit
Dependencies
vuerequiredRequired peer dependency for the Vue 3 framework.
@slickgrid-universal/excel-exportoptionalOptional package for enabling Excel export functionality.
@slickgrid-universal/graphqloptionalOptional package for GraphQL backend service integration.
@slickgrid-universal/odataoptionalOptional package for OData backend service integration.
@slickgrid-universal/sql-backend-serviceoptionalOptional package for SQL backend service integration (new in v10.4.0).
@slickgrid-universal/pdf-exportoptionalOptional package for PDF export functionality (introduced in v9.13.0).
jspdf-autotableoptionalOptional dependency for enhanced PDF exports via `@slickgrid-universal/pdf-export` (mentioned in v10.1.0).
@slickgrid-universal/commonrequiredContains core features, extensions, and interfaces for Slickgrid-Universal. While often implicitly installed, it's the foundation for many features.
Agent activity
5 hits · last 30 days
node
4
OpenAI (training)
1
Resources
slickgrid-vue — npm install slickgrid-vue · libregistry