trysound / datagrid Goto Github PK
View Code? Open in Web Editor NEWHome Page: https://trysound.github.io/datagrid
Home Page: https://trysound.github.io/datagrid
In test.setup.js
/* eslint-env node */
require('source-map-support');
code
export const bootstrap = element => props =>
Inferno.render(createElement(Grid, props), element);
example
import { bootstrap } from 'inferno-datagrid';
const updateGrid = bootstrap(document.querySelector('#grid'));
function subcribe(state) {
updateGrid(state);
}
...
Do not call toLowerCase if value is not a string.
There's nice jest.fn()
stuff which can simplify arguments/results tracking.
Add findRow(selected, datum, index) => true | false
option
And rename selectedIndex to selected
Call toLowerCase
on filters too and improve performance by comparing strings before indexOf
.
https://github.com/TrySound/inferno-datagrid/blob/master/src/utils/transform.js
/cc @friedbizkvit
It should be 0 by default to prevent crashing on substracting.
Just add e.preventDefault
here
https://github.com/TrySound/inferno-datagrid/blob/master/src/hoc/draggable.js#L17
In this case maybe user-select: none
is not necessary.
Somthing like this looks a bit better
withDraggable((props, action) => {}, options)
This let's to split render reaction of columns and rows
gridState: {
columns: [
{
name: string,
width: number
},
...
],
headerColumnsState: {
resizing: true | false,
moving: true | false,
name: string | null,
left: string | null,
right: string | null,
position: number | null
},
rowsState: {
selection: number[]
}
}
const HeaderColumn = ({ column, headerColumnsState, callback, ... }) => (
<div></div>
);
const Row = ({ columns, rowsState, callback, ... }) => (
<div></div>
);
scrollTop should be 0 by default
Maybe data calculating by pager props
pinnedLeft and pinnedRight reorders columns in interceptor component and places with corresponding left and right. Scroll processes with position: sticky.
Just to be flexible :)
By default there's only props and messages up which should transform and add change those props.
This decorator will contain:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.