finos / ipyregulartable Goto Github PK
View Code? Open in Web Editor NEWHigh performance, editable, stylable datagrids in jupyter and jupyterlab
License: Apache License 2.0
High performance, editable, stylable datagrids in jupyter and jupyterlab
License: Apache License 2.0
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
This seems an amazing library, but nowhere is clearly explained exactly how you are supposed to update the data in the table, how to access the underlying data structures, and much more. As an example, I'm trying to display the table inside an ipywidget box, and I don't know if it's possible and which function should I use. A practical example of how to construct DataModel class would be very useful too.
Lastly I am using get_state() and setData() to get the data from the table w and to change em, is there any easier way to get the data from the table if using pandas DataFrames like for example a w.to_dataframe() method?
EDIT: I see that using w.datamodel._data i can access the underlying dataframe, but if I change it the table widget doesn't update,is there a way to the refresh the view programmatically?
Thanks for this very good component
could be helpful to add an example of read-only grid.
Here is a skeleton:
query = "" # ...
engine = None #...
description = pd.read_sql_query(query, engine) # add some more context
class DataFrameModel_noedit(rt.datamodel.pandas.DataFrameDataModel):
def editable(self, x, y):
return False
w1 = rt.RegularTableWidget()
w1.datamodel = DataFrameModel_noedit(description)
w1
Thanks again for this extension!
Another thing I noticed while looking into #23: once enough heavy labextensions are loaded in lab2, the build can start failing because webpack runs out of RAM/open file handles.
Changing the exports
when registering the extension to be lazy loading with await import
allows the downloading of the widget (and dependencies) to be deferred until the widget is actually requested, and not block the moon animation.
In this case, it knocks 7mb off the main
bundle in development (already 30mb), while similarly taking 600kb off the production build (4.5mb)
diff --git a/js/src/plugin.ts b/js/src/plugin.ts
index ca5e534..938fe5b 100644
--- a/js/src/plugin.ts
+++ b/js/src/plugin.ts
@@ -18,7 +18,6 @@ import {
IJupyterWidgetRegistry,
} from "@jupyter-widgets/base";
-import * as widgetExports from "./widget";
import {
MODULE_VERSION,
@@ -44,7 +43,7 @@ export default examplePlugin;
*/
function activateWidgetExtension(app: Application<Widget>, registry: IJupyterWidgetRegistry): void {
registry.registerWidget({
- exports: widgetExports,
+ exports: async () => await import(/* webpackChunkName: "ipyregulartable" */ "./widget"),
name: "ipyregulartable",
version: MODULE_VERSION,
});
diff --git a/js/tsconfig.json b/js/tsconfig.json
index 71bc63b..03397b3 100644
--- a/js/tsconfig.json
+++ b/js/tsconfig.json
@@ -3,7 +3,7 @@
"declaration": true,
"esModuleInterop":true,
"lib": ["es2015", "dom"],
- "module": "commonjs",
+ "module": "esnext",
"moduleResolution": "node",
"noUnusedLocals": true,
"outDir": "./lib",
@@ -13,11 +13,11 @@
"sourceMap": true,
"strict": true,
"strictPropertyInitialization": false,
- "target": "ES6",
+ "target": "es2015",
"types": ["jest", "node"]
},
"include": [
"src/**/*.ts",
"src/**/*.tsx",
]
-}
\ No newline at end of file
+}
Hi folks! Congrats on the release!
I'd ❤️ to package this for conda-forge, and am noticing a few irregular things in the metadata/build:
(('2.7', '>=3.7'))
but the trove classifiers claim 3.6
python_requires
which most pip
s will actually honorjs/lib
pip install
needs node
(much less yarn
) at install time, when error messages can get very buried
Happy to PR some of these things!
Is there a working example?
@JHawk has put together a few of what can be described as "extensions". Since I reimplement many of them here, we should leverage the fact that they're now exported
Row Stripes - https://github.com/jpmorganchase/regular-table/blob/master/examples/row_stripes.md
Row, Column, and Area Mouse selection - https://github.com/jpmorganchase/regular-table/blob/master/examples/row_column_area_selection.md
Row Mouse Selection - https://github.com/jpmorganchase/regular-table/blob/master/examples/row_mouse_selection.md
Column Mouse Selection - https://github.com/jpmorganchase/regular-table/blob/master/examples/column_mouse_selection.md
Area Selection - https://github.com/jpmorganchase/regular-table/blob/master/examples/area_mouse_selection.md
Looks like an organization has disabled GitHub actions, thereby disabling all CI
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.