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

Different background color to even and odd rows in ListView #1153

Closed
Ofer-Gal opened this issue Mar 14, 2022 · 7 comments · Fixed by #1192 or #1205
Closed

Different background color to even and odd rows in ListView #1153

Ofer-Gal opened this issue Mar 14, 2022 · 7 comments · Fixed by #1192 or #1205
Labels
status:fixed-next-drop Issue will be fixed in upcoming release. type:enhancement New feature or enhancement of existing capability
Milestone

Comments

@Ofer-Gal
Copy link

Category

[? ] Enhancement
[? ] Question

Version

Please specify what version of the library you are using: [ 3.6.0 ]

Expected / Desired Behavior / Question

Is there a way to Style even and odd rows in ListView with different color?

@ghost
Copy link

ghost commented Mar 14, 2022

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

@ghost ghost added the Needs: Triage 🔍 label Mar 14, 2022
@milanholemans
Copy link
Contributor

milanholemans commented Mar 15, 2022

As far as I know I'm afraid the answer is no. Although this seems relatively easy to implement by exposing an extra property called 'onRenderRow' used in this example. I can add this, but it's not up to me to decide whether or not to add it.

@joelfmrodrigues
Copy link
Collaborator

@Ofer-Gal thanks for the suggestion.
@milanholemans more than happy to get a PR with the change :) Any improvements are welcome.
Please just keep in mind to make the property optional and disabled by default, so anyone upgrading versions would not experience a different behaviour by default.

@joelfmrodrigues joelfmrodrigues added type:enhancement New feature or enhancement of existing capability and removed Needs: Triage 🔍 labels Apr 23, 2022
@joelfmrodrigues joelfmrodrigues added the status:fixed-next-drop Issue will be fixed in upcoming release. label Apr 29, 2022
@joelfmrodrigues joelfmrodrigues added this to the 3.8.0 milestone Apr 29, 2022
@AJIXuMuK AJIXuMuK mentioned this issue May 3, 2022
@Ofer-Gal
Copy link
Author

Ofer-Gal commented May 3, 2022

@AJIXuMuK
What will the property be? or How would I get it to work?

@milanholemans
Copy link
Contributor

As far as I know I'm afraid the answer is no. Although this seems relatively easy to implement by exposing an extra property called 'onRenderRow' used in this example. I can add this, but it's not up to me to decide whether or not to add it.

@Ofer-Gal you can use the same approach as in the example linked above.

@SharePointReady
Copy link

Hi @milanholemans,

The example given at example is not working for listView control. It is giving below error. Can you please check?

image

@milanholemans
Copy link
Contributor

Hi @SharePointReady, I think the issue is that an SPFx web part and PnP SPfx controls are targeting a different version of fluent UI. An SPFx web part uses version ^8.106.4, SPFx controls use 8.106.4 strictly.
I suggest that you run npm i @fluentui/react@8.106.4 -SE so you're always on the same version of Fluent UI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:fixed-next-drop Issue will be fixed in upcoming release. type:enhancement New feature or enhancement of existing capability
Projects
None yet
4 participants