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

Added setFilterChipProps #1387

Merged
merged 1 commit into from
Jul 10, 2020
Merged

Added setFilterChipProps #1387

merged 1 commit into from
Jul 10, 2020

Conversation

patorjk
Copy link
Collaborator

@patorjk patorjk commented Jul 3, 2020

New option that allows you to add props to the Filter Chip component. Works identically to the other setXProps methods. Example:

  setFilterChipProps: (colIndex, colName, data) => {
    //console.log(colIndex, colName, data);
    return {
      color: 'primary',
      variant: 'outlined',
      className: 'testClass123',
    };
  }

Useful for easily customizing to a filter chip. This can already be done through the custom component feature, but doing it that way is a bit of work. Using setFilterChipProps would make customization a lot easier.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.3%) to 72.055% when pulling 3c44aaa on setFilterChipProps into 468c9c7 on master.

@@ -235,6 +235,14 @@ class Example extends React.Component {
filter: true,
filterType: 'multiselect',
responsive: 'standard',
setFilterChipProps: (colIndex, colName, data) => {
//console.log(colIndex, colName, data);
Copy link
Collaborator

@wdh2100 wdh2100 Jul 6, 2020

Choose a reason for hiding this comment

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

I think it's better to delete it than comment it out.

@patorjk patorjk changed the base branch from master to v3_2_0 July 10, 2020 20:40
@patorjk patorjk merged commit 31a3f32 into v3_2_0 Jul 10, 2020
@patorjk patorjk mentioned this pull request Jul 10, 2020
@wdh2100 wdh2100 deleted the setFilterChipProps branch December 11, 2020 23:38
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.

None yet

3 participants