revolist / revogrid-column-select Goto Github PK
View Code? Open in Web Editor NEWCustom column type for RevoGrid component based on revo-dropdown library.
Home Page: https://rv-grid.com
License: MIT License
Custom column type for RevoGrid component based on revo-dropdown library.
Home Page: https://rv-grid.com
License: MIT License
Hi there,
I am using the SelectTypePlugin()
to add a dropdown/selector to revogrid columns. Would it be possible to update the items in the dropdown/selector based on another cells value?
{
prop: "type",
name: "Type",
source: ["Volume", "Mass", "Length"]
columnType: "select",
},
{
prop: "units",
name: "Units",
source: ["ml, "L", "g", "kg", "m", "km"]
columnType: "select",
}
For instance, if for the Type
column Volume
is selected only the items mL
and L
should appear in the Units
column. Accordingly if Mass
is selected only g
and kg
should be listed, etc...
I was hoping for a callbach function similiar to how the readonly
key can be adjusted for a single cell like it was described in issue #323. However, it seems that the source
key only accepts a list and not a function (source code).
Is there a workaround to archive the desired result or do you think it might be important enough to implement the callback function logic for one of the next releases?
Thanks,
Christian
Whatever I try, I cannot make this component work with the vue3-datagrid (No clickable down arrow appears). I tried with different versions of vue3 (<3.1) and different versions of vue3-datagrid. Should this be possible? Is there a working example somewhere?
In this example I have created a simple table with a selectable color. Each of my colors represent a number, when you attempt to open the dropdown no results will be shown.
import SelectTypePlugin from "@revolist/revogrid-column-select";
I am using Angular 13, but the plugin is not importing.
error TS7016: Could not find a declaration file for module '@revolist/revogrid-column-select'. 'D:/jri/admin-angular-ui/node_modules/@revolist/revogrid-column-select/dist/main.js' implicitly has an 'any' type.
Try `npm i --save-dev @types/revolist__revogrid-column-select` if it exists or add a new declaration (.d.ts) file containing `declare module '@revolist/revogrid-column-select';`
Could you check this issue?
column_schema: [ { prop: "name", name: "ID", }, { prop: "details", name: "Name", }, { prop: "drops", name: "Data", labelKey: 'show', valueKey: 'data', source: [ {show: 'According', data: 'a'}, {show: 'Over', data: 'b'}, {show: 'Source', data: 's'} ], columnType: 'select' } ],
https://codesandbox.io/s/8zkd4
Render Error. Like Demo.
17 line of renderer.tsx val is undefined, it will report an error
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.