Skip to content

Conversation

gpedro
Copy link

@gpedro gpedro commented Feb 17, 2023

usage:

new Grid({
      columns: ['a', 'b', 'c'],
      data: [
        [1, 2, 3],
        [4, 5, 6],
      ],
      className: {
        tr: (row, header) => {
          console.log('tr', { row, header })
          return 'aaa'
        },
        td: (cell, columnId, row) => {
          console.log('td', { cell, columnId, row })
          return 'aaa'
        },

      }
    }).render(ref.current);

resolves #974

@gpedro gpedro changed the title feat: row and cell style generator feat: row and cell className generator Feb 17, 2023
@bravo-kernel
Copy link

This would be nice 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dynamic styling for tr Row doesn't work

2 participants