Giter Site home page Giter Site logo

Comments (3)

majorye avatar majorye commented on July 17, 2024

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.

majorye avatar majorye commented on July 17, 2024

which scenario we need this feature?

  1. cell data , we should process the rowData , then get it
  2. 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.

eternalsky avatar eternalsky commented on July 17, 2024

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 renderto realize the type by oneself is the best way.

from uxcore-table.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.