Comments (3)
use formatHandler to process it, like
let columns = [
...
{ dataKey: 'email',title:"Email",width: 200, formatHanlder: function(){
return ...
}}
...
];
render & formatHandler relationship
- in render, we call formatHandler to format render content before render content return
from uxcore-table.
which scenario we need this feature?
- cell data , we should process the rowData , then get it
- diff role, diff case , show diff action (for action column)
certain type column
right now, we have some type of column:
- action
- checkbox
- select
- text
- person
- money
- card
- cnmobile
the display of these columns have been fixed, so for the custom cell feature, should just for cell data custom.
Custom column
for some special requirement , we have custom column way to meet it : use "render" function to meet it, it has the highest priority between type column .
like below , the Monty column will use custom render way, not the type 'money' way.
{ dataKey: 'email',title:"Money",type:'money',width: 200,ordered:true , render: function(){ ... }}
use certain type, but also want custom column , this requirement become invalid, right now do not support .
So for custom cell feature, we could add Hook before render, named "beforeRender" , give the hook for user , have opportunity to custom the cell data
from uxcore-table.
In fact,render
has been playing the role of modifyCell
and has the highest flexibility. At this point, the issue may be meaningless and even beforeRender
is useless too. Just as you say, if one wants to use certain type and also to modify the cell, using render
to realize the type by oneself is the best way.
from uxcore-table.
Related Issues (20)
- IE11下,table编辑模式的校验有问题 HOT 2
- addEmptyRow新增行控制插入顺序 HOT 2
- 表格是否需要支持跨页勾选、是否需要提供获取已勾选数据的api HOT 1
- 表头筛选的功能有考虑加入吗? HOT 3
- 表格行内编辑required验证在一条数据的情况下,tooltip发生了realign HOT 1
- Tree 模式支持数据异步加载 HOT 1
- toggleSubComp 支持传入数组
- 在开启树形表格的情况下,如果数据内容不满足树形表格格式,会多出来一个具有宽度的空div HOT 1
- addEmptyRow()和addRow()能否在第一行前面增加新行 HOT 1
- 外层通过传入 currentPage 属性无法重置内部的 currentPage 值,有这个机制,但是实现有 bug HOT 1
- 可以设置table的默认rowSelected状态吗 HOT 2
- 优化文档
- 建议将doubleClickToEdit的默认值修改为false HOT 1
- 对rowSelection的onSelect与onSelectAll的建议 HOT 1
- 希望能新增 defaultOrder 的功能
- renderSubComp 受外界props控制 HOT 1
- 列的宽度能通过权重控制 HOT 1
- How could I toggle loading state manually?
- rowSelection缺少selectedRowKeys参数,没法设置默认选中项,没法实现跨页选择
- columnResizeable无效
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 uxcore-table.