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

fix checkbox display #956

Closed
wants to merge 4 commits into from
Closed

Conversation

Jotakuun
Copy link

@Jotakuun Jotakuun commented Sep 5, 2017

What kind of change does this PR introduce? (check one with "x")

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

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")

  • Yes
  • No

If this PR contains a breaking change, please describe the impact and migration path for existing applications: ...

Other information:

@Jotakuun
Copy link
Author

Jotakuun commented Sep 5, 2017

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.

@wizarrc
Copy link
Contributor

wizarrc commented Sep 5, 2017

@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.

@wizarrc
Copy link
Contributor

wizarrc commented Sep 5, 2017

I suggest moving line 1-8 to https://github.com/swimlane/ngx-datatable/blob/master/assets/app.css next to .expectedpayments section, and uncomment line 1 and 2.

@Jotakuun
Copy link
Author

Jotakuun commented Sep 5, 2017

Ok, thank you @wizarrc
I removed the comments I left in material.scss and I moved those lines to the app.css

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;
Copy link
Contributor

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?

Copy link
Author

@Jotakuun Jotakuun Sep 6, 2017

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?

Copy link
Contributor

@wizarrc wizarrc Sep 6, 2017

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.

Copy link
Contributor

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.

Copy link
Author

@Jotakuun Jotakuun Sep 11, 2017

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.

Copy link
Contributor

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.

Copy link
Contributor

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.

Copy link
Author

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.

@wizarrc
Copy link
Contributor

wizarrc commented Sep 11, 2017

related issue #939

@Jotakuun Jotakuun closed this Sep 11, 2017
@Jotakuun Jotakuun deleted the fix-checkbox-display branch September 11, 2017 14:27
@iamchiranjeevin
Copy link

im using latest version i still cant see the checkboxes

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.

4 participants