-
Notifications
You must be signed in to change notification settings - Fork 23
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
fix: apply even/odd classes correctly when rows are grouped #111
base: master
Are you sure you want to change the base?
Conversation
e62e202
to
c15be94
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can reevaluate the string type for the group index row index combination
return this.rowIndex; | ||
} | ||
|
||
const [, innerIndex] = this.rowIndex.match(/\d+-(\d+)/); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to not use a string as a group - group item index but use two entries in a structure like groupIndex and rowIndex. I do not like the regex approach here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not using a string will be a breaking change as we emit this type. While I would love to do this, I think we should wait and first just have the types.
* Represents the index of row. Usually a number. | ||
* If the Row is grouped it returns a string with this pattern: `<indexOfGroup>-<indexOfRowInGroup>` | ||
*/ | ||
export type RowIndex = number | `${number}-${number}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to use a string? I would prefer to have a composite here.
What kind of change does this PR introduce? (check one with "x")
What is the current behavior? (You can also link to an open issue here)
When using groups, all rows are marked as
odd
What is the new behavior?
When using groups, all rows are marked as
event
/odd
toggling in their group. So, the first element in a group will always beeven
.Does this PR introduce a breaking change? (check one with "x")
If this PR contains a breaking change, please describe the impact and migration path for existing applications: ...
Other information: