Skip to content

Conversation

jcfilben
Copy link
Collaborator

@jcfilben jcfilben commented Mar 30, 2023

What does this PR do?

Fixed issue in DataTable when the rows are selectable and have a border the border doesn't show up on the CheckBox cell.

Where should the reviewer start?

What testing has been done on this PR?

Added a jest test and tested with the following story:

import React from 'react';

import { Box, DataTable } from 'grommet';

export const Test = () => (
  <Box align="center" pad="large">
    <DataTable
        data={[
          { name: "Alan", percent: 20 },
          { name: "Bryan", percent: 30 },
          { name: "Chris", percent: 20 },
          { name: "Eric", percent: 80 }
        ]}
        columns={[
          {
            property: "name",
            header: "Name",
            primary: true
          },
          {
            property: "percent",
            header: "Percent Complete"
          }
        ]}
        border={{ body: { side: "bottom" } }}
        onSelect={() => {}}
        groupBy={{ property: 'percent' }}
      />
  </Box>
);

export default {
  title: 'Visualizations/DataTable/Test',
};

How should this be manually tested?

Do Jest tests follow these best practices?

  • screen is used for querying.
  • The correct query is used. (Refer to this list of queries)
  • userEvent is used in place of fireEvent.
  • asFragment() is used for snapshot testing.

Any background context you want to provide?

What are the relevant issues?

Closes #6657

Screenshots (if appropriate)

Do the grommet docs need to be updated?

No

Should this PR be mentioned in the release notes?

Yes

Is this change backwards compatible or is it a breaking change?

Backwards compatible

@jcfilben jcfilben changed the title Fixed issue where border was not applied to CheckBox cells in DataTable Fixed issue where border is not applied to CheckBox cells in DataTable Mar 30, 2023
@jcfilben jcfilben requested a review from taysea March 30, 2023 20:35
Copy link
Collaborator

@taysea taysea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@taysea taysea requested a review from ericsoderberghp March 31, 2023 19:39
@ericsoderberghp ericsoderberghp merged commit eb06fc3 into grommet:master Mar 31, 2023
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.

DataTable border does not get applied to checkbox column
3 participants