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

Conditional Row Styles Not Being Applied To All Cases #657

Closed
Julius-ERCM opened this issue Aug 21, 2020 · 3 comments
Closed

Conditional Row Styles Not Being Applied To All Cases #657

Julius-ERCM opened this issue Aug 21, 2020 · 3 comments
Labels
wontfix This will not be worked on

Comments

@Julius-ERCM
Copy link

I seem to be having an issue with the conditional row styling.
I follow the example in the storybook and my row styling only seems to be using the last "when" case and ignoring anything before it

const conditionalRowStyles = (one, two) => { return [ { when: row => row.value === one, style: { backgroundColor: '#21ba45', color: 'white', }, when: row => row.value === two, style: { backgroundColor: 'orange', color: 'white', } } ] }

@vasuchawla
Copy link

if you are also using "stripped" attribute,

you need to add !important to your background colors else the stripped's style's background color takes priority.

@jbetancur
Copy link
Owner

jbetancur commented Sep 9, 2020

@Julius-ERCM before opening an issue please make sure you read: #387

Since https://github.com/jbetancur/react-data-table-component/releases/tag/v6.11.1

striped rows are no longer generated via CSS (to solve this issue) so make sure you are using 6.11.1+.

@stale
Copy link

stale bot commented Oct 9, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Oct 9, 2020
@stale stale bot closed this as completed Oct 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants