Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: row and cell className generator #1315

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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