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: adds support for raw and content object in ExpandableTable #122

Conversation

gabrielmicko
Copy link
Contributor

@gabrielmicko gabrielmicko commented Dec 17, 2019

PR checklist

  • I have followed the "Committing and publishing" guidelines;
  • I have added unit tests to cover my changes;
  • I updated the documentation and examples accordingly;

Changes description

react-expandable-table:

Adds support for passing React.Node in data to the ExpandableTable in the following way:

  data: [
    {
      id: '4',
      name: 'Black Widow',
      rank: '4',
      mentions: '17',
      kol_score: '0.00%',
      reach: '0.00%',
      score: 800,
    },
    {
      id: '5',
      name: 'Hulk',
      name: {
        raw: 'Hulk',
        content: <span style={{ color: 'gray' }}>Hulk</span>,
      },
      rank: '5',
      mentions: '35',
      kol_score: '99.10%',
      reach: '99.10%',
      score: 10,
    },

raw is the raw value. It is needed to no break the sorting functionality. content could be a React.Node so you could style your component based on your need.

Screenshot 2019-12-17 at 16 33 51

Affected packages

  • @quid/react-expandable-table

@gabrielmicko gabrielmicko merged commit 8e4084b into master Dec 17, 2019
@gabrielmicko gabrielmicko deleted the feature/Adds-support-for-content-and-raw-in-ExpandableTable branch December 17, 2019 18:25
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.

2 participants