GithubHelp home page GithubHelp logo

datagridxl / datagridxl2 Goto Github PK

View Code? Open in Web Editor NEW
474.0 5.0 19.0 468 KB

Excel-like Experience for Web Apps (The performant & reliable Vanilla Javascript data grid with Excel-like controls)

License: Other

JavaScript 100.00%
grid javascript table csv-editor data-editing data-management data-tables datagrid datatable excel

datagridxl2's Introduction

Note: this is a repo for (DEPRECATED) DataGridXL version 1.


DataGridXL

An official repository for DataGridXL v1: the reliable & performant Vanilla Javascript data grid.

DataGridXL Screenshot

Usage

Include datagridxl.js in your web page HTML file:

<script src="https://code.datagridxl.com/datagridxl.js"></script>

License

Important: To use DataGridXL in live environments, a license is required.

ONLY for non-live environments (internal development purposes), you can use DataGridXL without a license.

Without a license:

  • you are required to show the DataGridXL text link ("data grid by DataGridXL") at all times
  • you are not entitled to receive any technical support

How to display the logo/link

The text link should have a font-size of at least 14px and the text "DataGridXL" should be clearly a link: underlined and in a color that makes it clear that it is indeed a link.

To get rid of the link, purchase a license.

To purchase a commercial license for the current version of this library, visit DataGridXL Online Store

More info

Visit the DataGridXL website for more information and documentation.

Contact us

datagridxl2's People

Contributors

datagridxl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

datagridxl2's Issues

Error: Could not find a declaration file for module

Screenshot from 2022-09-23 11-23-03

I am getting this error while importing import DataGridXL from '@datagridxl/datagridxl2';
Is there any way to use this in Angular.

Also, It would be helpful, If anyone has Angular implementation code for latest version.

Thanks

CMD+Z puts caret in cellEditor

This might be an OS feature that we need to leave alone, or... we need to fix it. Investigate...

This happens in Safari and in Chrome on MacOS, so quite likely to be a native macOS thing.

getCellValue always returns undefined

Hi @DataGridXL !

I can't get a value from a cell. I'm trying to use getCellValue, but it always returns undefined.
How should I call this function? With two coordiantes arguments? With 1 dict arguemnt? or with array?

Double tapping cell opens cellEditor (on touch)

Strange this here is: if tapping on one cell, then quickly tapping on another cell, dblclick event is recognized (which makes sense). However, eventArea.dblclick handler should check for areCoordsEqual (new tap vs. prev tap). Somehow the openCellEditor method is still called.

Chrome caches mouse cursor: displays wrong cursor on init grid

Chrome (on ChromeOS) seems to cache the "cursor" property after it has been changed in "setMouseCursorState". When the user reloads the page (F5), the cursor is not set back to "default", it might still display "grab" when the mouse cursor position hasn't changed since the last grid.

Fix TypeError ctrlKey warning

Uncaught TypeError TypeError: Cannot read properties of undefined (reading 'ctrlKey')
at move (datagridxl2.js:8:96248)     at <anonymous> (datagridxl2.js:8:104181)     at uo (datagridxl2.js:8:77401)

Ticket /198

Inspect newline code on Windows (\n\r)

The formatValue private method replaces \n chars with newline symbols. That works on our ChromeOS, but \r is sometimes used. Check on Windows - using crossbrowsertesting

Edge detection speed is not equal in all cases

Edge detection is too fast in grids that have only rows to scroll, compare to grids that scroll in Y and X directions.

Edge detection in a grid that scrolls both directions is nice and steady:
https://datagridxl.com/demos/one-million-cells.

Edge detection in a grid that scrolls only rows is too fast:
https://datagridxl.com/demos/array-of-arrays-2d-array

The "Sorting Columns" demo even does native edge detection when mouse is close to window edges. This native edge detection scrolls the window. Should be disabled in case mouse drag started out of DGXL instance: https://datagridxl.com/demos/sorting-columns

Add catch-all event "change"

It's already on our API page:

Catch-all event for any event that might change the data set: setcellvalues, deletecols/-rows, insertcols/-rows, movecols/-rows.

Copied cells comes with double quotes

Cell value: Hi my “name” is Rogerio
Copy value from cell: “Hi my “”name”” is Rogerio”

These double quotes probably come from PapaParse parse/unparse methods. Check if we need to have these double quotes. Copying Hi my “name” is Rogerio from Google Spreadsheets does not result in double quotes.

Perhaps introduce a new option:

var grid = new DataGridXL("grid", {
  addQuotesToCopiedValues: false
});

Limit edge detection direction during fillCells drag action

Issue:
Edge detection is always on "xy". However, fillCells action is either "x" or "y" depending on user drag. Match edge detection direction with current fillCells action direction.

Objective:
Match edge detection direction with fillCellsDirection while fillCells mouse drag action.

Uncaught RangeError: Maximum call stack size exceeded

I got Uncaught RangeError: Maximum call stack size exceeded when running:

new DataGridXL("grid", {
                        data: DataGridXL.createDummyData(500000, 1),
                        allowInsertRows: false,
                        allowDeleteRows: false,
                        allowMoveRows: false,
                        allowInsertCols: false,
                        allowDeleteCols: false,
                        allowMoveCols: false,
                        allowFillCells: false,
                        allowEditCells: false,
                        allowCut: false,
                        allowPaste: false,
                        allowResizeCols: true,
                        allowCopy: true
                    });

It seems like you can't achieve 1 million cells with super thin and long columns :(

Does DataGridXL have something that would allow me to split my data and have it loaded whenever the user scrolls down/up far enough to trigger loading the new pagination. And then comes another question: would I need to instantiate a new table or is there some method/function for appending data to the table?

\n character at end of pasted text should be ignored (MS Excel issue)

From Zendesk Ticket 185:

Copying three cells in a single rows (A B C) copies "A\tB\tC\n" (Windows 10, Excel) instead of "A\t\B\tC" (expected, as seen in Excel Online). This \n character has DataGridXL believe that there are 2 rows copied, instead of just one. It somehow also clears any value in the first cell of this second row.

copy to clipboard with headers

The upper left square in the table can be clicked to highlight all and copy, but it doesn't include the headers. What option should we set to include the headers, not just the data rows? Thanks

Mousemove while drag-selecting downwards slows down scrolling of grid

When mouse-drag selecting downwards (mouse outside of grid), edge detection is activated. Only when mouse stays still the scrolling remains in a solid tempo.

When mouse moves during this drag action, even if mouse movement/coordinates should not affect grid scroll speed (eg. mouse only moves horizontally, which should not affect vertical scroll speed), grid scrolling slows down considerably.

Incorrect rendering of pasted multiline values

When copying a cell range from G. Sheets, cell values that contain newlines are formatted in quotes ("..."). Do the same for DGXL2 in handleCopy/handleCut handlers (in getCellRangeText method specifically). Also, adjust paste/handlePaste so any quoted values are parsed as a single cell value. (In TSV, a newline is considered a new row of values.)

Copying selection of empty cells from Excel Online does not work

Example: copy 2x2 empty cells from Excel Online to DGXL in this Codepen demo: https://codepen.io/datagridxl/pen/mdXxXPR. It doesn't work in DGXL; it works in HoT though.

When pasting the values in the "Check Formatting" textarea, the copied string is "". It seems that HoT reads other data than the copied string. Perhaps the clipboard object holds more detailed Excel info, as they cannot possibly interpret "" as meaning 2x2 empty cells.

handleFullscreenEnter activates grid without cellSelection

Fullscreen button might be pressed when grid is not active. Inside handleFullscreenEnter we activate the grid, which resumes keyboard controls. However, there might be no cell selection. A key like "backspace" results in an error.

Cannot read properties of undefined (reading 'x') at normalizeRange

Add "change" event listener

The api mentions a change listener, but it's not implemented. The change event should fire on all events that change document data set

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.