-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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 checkbox display #956
fix checkbox display #956
Conversation
I don't know why checkbox and radio inputs wasn't displaying because if there is a reason to hide it or a new behaviour just tell me and I'll fix it and update the pull request. |
@Jotakuun Line 1 - 8 should never have been added. It looks like it was accidently added from the row grouping PR. That stuff should be moved to the demo css file. |
I suggest moving line 1-8 to https://github.com/swimlane/ngx-datatable/blob/master/assets/app.css next to |
Ok, thank you @wizarrc By the way, those classes and ids selectors doesn't match to the row-grouping checkboxes anymore. So I named it like they are now. But anyway, row-grouping demo is not working because all labels are recieving same name and id from rowIndex. I'm going to investigate what's happening and let's see if I can fix it. |
@@ -682,7 +682,8 @@ export class DataTableBodyComponent implements OnInit, OnDestroy { | |||
* Gets the row index given a row | |||
*/ | |||
getRowIndex(row: any): number { | |||
return this.rowIndexes.get(row) || 0; | |||
// return this.rowIndexes.get(row) || 0; |
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.
@Jotakuun The indexOf
array function is much slower than the Map get
function. Are you having issues with it returning the wrong value?
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.
@wizarrc Ok, so it looks like the getRowIndex() was changed in last release and this piece of code wasn't working for rowGroups because rowIndexes is not returning any index for rowGroups. I couldn't figure it out why. Any suggestion?
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.
hmm, not sure. Didn't really get a chance to look over the row groups PR that much. I can tell you that rowIndexes
should have a list of indexes looked up by row, same as the rows
array being searched manually, but much slower. If rowIndexes
isn't producing correct results, then it's not being updated correctly.
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.
Grouped row indexes are in a different collection.
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.
And where is it? The rowIndexes
are not updating in the updateRows()
method when there's groupedRows.
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.
Can we treat this is a separate issue? I find value in moving the css out of the material.scss
as it's causing issues.
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.
i removed it and released thisx morning.
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.
I agree, this is completely another issue. I update the PR again with just the material.scss
and we treat this in another pull request.
related issue #939 |
im using latest version i still cant see the checkboxes |
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)
#943
What is the new behavior?
I just removed the display none from the material.scss.
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: