Comments (9)
I mapped, but would be great to have a cb in the colDef.
Mb will do it by myself when have time.
from ka-table.
hi @aleksei-baryshnikov you can have [object].[prop] keys (in your example it is 'type.value') in that case grouping will work
example: https://stackblitz.com/edit/table-grouping-ts-mg79sz?file=Demo.tsx
from ka-table.
But in some cases it could be { value: { key: value } }
.
In that case should I specify that for each column?
Is it possible to have a function in colDef to build the groupKey?
from ka-table.
Can't you just map your data to type.value structure ?
from ka-table.
I can't because in some cases I need to aplly special formatting for the cells. Saying that a cell value couldn't be a string. This is why it would be nice having a property like format
.
from ka-table.
For me the problem is that the cell contains some meta information which needs for making some actions when an user clicks on a cell. And ka-table takes it as is, as you can see on the screen. Here is no possibility to define key for cell rendering and key for cell grouping separately.
If I set key: cell.value
then I am missing cell.actions
in the table config, like FormatFunc.
from ka-table.
you can map data and add separate prop for grouping, and by onClick or any other actions you can access original data though rowData, example: https://stackblitz.com/edit/table-grouping-ts-hdf9h3?file=Demo.tsx
from ka-table.
That works but how to be with groups? I want to have the same formatting in there.
But in grouping I don't have rowData
if a group is collapsed, so it doesn't give me actions
.
from ka-table.
There is groupItems
in Group, you can access required data using it, demo: https://stackblitz.com/edit/table-grouping-ts-wg5rpj?file=Demo.tsx
from ka-table.
Related Issues (20)
- Header Filter Popup Mispositioned with Horizontal Scrolling Table HOT 1
- Bulk select HOT 1
- support placeholder HOT 2
- Is rows ordering persistent? HOT 1
- Column in ITableProps does not contain the property 'editor' HOT 1
- Using the SelectionHeader example from the docs cause crash when 'dispatch' function is passed into the table component. HOT 1
- Filter operators isEmpty and isNotEmpty are Non-functional HOT 2
- Make table cell clickable HOT 1
- Actual filtered data HOT 1
- sort prop in ka-table not supporting server-side sorting HOT 3
- Reordering group of colomns HOT 2
- Problem with virtual scrolling, many columns and not so many data HOT 2
- Jest deprecations on mock functions produced with jest.fn() HOT 1
- are async validations possible? HOT 2
- Add previous state in onDispatch action HOT 10
- Unable to select all the cell content with mouse double click in firefox HOT 4
- Add a search bar inside of the "Header Filter" HOT 8
- Dynamically calculate page number of a row when grouping is implemented HOT 2
- Feature Request: When virtualScroll is enabled, have Summary row always be visible HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ka-table.