Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ag-grid-enterprise/clipboard

Package Overview
Dependencies
Maintainers
3
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ag-grid-enterprise/clipboard

Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue

  • 30.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
66K
decreased by-56.19%
Maintainers
3
Weekly downloads
 
Created

What is @ag-grid-enterprise/clipboard?

@ag-grid-enterprise/clipboard is an npm package that provides clipboard functionality for AG Grid, a popular JavaScript data grid. This package allows users to copy and paste data to and from the grid, enhancing the user experience by enabling seamless data manipulation.

What are @ag-grid-enterprise/clipboard's main functionalities?

Copy to Clipboard

This feature allows users to copy selected cell data from the grid to the clipboard. The code sample demonstrates how to enable clipboard functionality in AG Grid by setting `enableClipboard` to true in the grid options.

```javascript
import { GridOptions } from 'ag-grid-community';
import '@ag-grid-enterprise/clipboard';

const gridOptions: GridOptions = {
  columnDefs: [
    { field: 'make' },
    { field: 'model' },
    { field: 'price' }
  ],
  defaultColDef: {
    editable: true
  },
  enableRangeSelection: true,
  enableClipboard: true
};

// Assuming you have a div with id 'myGrid'
const eGridDiv = document.querySelector('#myGrid');
new agGrid.Grid(eGridDiv, gridOptions);
```

Paste from Clipboard

This feature allows users to paste data from the clipboard into the grid. The code sample shows how to enable clipboard functionality and customize the processing of pasted data using the `processCellFromClipboard` callback.

```javascript
import { GridOptions } from 'ag-grid-community';
import '@ag-grid-enterprise/clipboard';

const gridOptions: GridOptions = {
  columnDefs: [
    { field: 'make' },
    { field: 'model' },
    { field: 'price' }
  ],
  defaultColDef: {
    editable: true
  },
  enableRangeSelection: true,
  enableClipboard: true,
  processCellFromClipboard: params => {
    // Custom processing of clipboard data
    return params.value.toUpperCase();
  }
};

// Assuming you have a div with id 'myGrid'
const eGridDiv = document.querySelector('#myGrid');
new agGrid.Grid(eGridDiv, gridOptions);
```

Copy with Headers

This feature allows users to copy selected cell data along with the column headers to the clipboard. The code sample demonstrates how to enable this functionality by setting `clipboardCopyHeaders` to true in the grid options.

```javascript
import { GridOptions } from 'ag-grid-community';
import '@ag-grid-enterprise/clipboard';

const gridOptions: GridOptions = {
  columnDefs: [
    { field: 'make' },
    { field: 'model' },
    { field: 'price' }
  ],
  defaultColDef: {
    editable: true
  },
  enableRangeSelection: true,
  enableClipboard: true,
  clipboardCopyHeaders: true
};

// Assuming you have a div with id 'myGrid'
const eGridDiv = document.querySelector('#myGrid');
new agGrid.Grid(eGridDiv, gridOptions);
```

Other packages similar to @ag-grid-enterprise/clipboard

Keywords

FAQs

Package last updated on 16 Jun 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc