-
Notifications
You must be signed in to change notification settings - Fork 313
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
'selectAllCheckbox' and 'selectAllCheckboxSomeSelected' Table properties are not working and throwing error #2915
Comments
I am able to reproduce the same Please check this code sandbox |
Hey @AmirHussain93, this is correct. You can achieve this as such:
|
@Akshat55 I am unable to achieve this even after using |
@AmirHussain93 You need to make your sandbox public, we do not have permission to access it: |
@Akshat55 any update on this? Did you get a chance to look into the code sandbox I shared in the above comment |
@AmirHussain93 I still cannot open it, could you perhaps copy over your changes to stackblitz? We are slowly starting to move away from codesandbox due to these reasons. |
@Akshat55 please check now |
@Akshat55 I guess you are able to access now |
@AmirHussain93 - Yes I have access now, seems like the data is being set before the subscription that listens for table checkbox change starts listening. Should be a simple fix where we call |
@Akshat55 any update on this? |
My colleague hasn't had the chance to review this unfortunately, but you can do the following which works:
After testing the above, it makes me wonder if we actually need a PR to address this. You can set the data in ngOnInit and then selectAll AFTER view is initialized. You can even keep |
🎉 This issue has been resolved in version 5.27.4 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Detailed description
I have a requirement to show rows as selected by default and if all rows are selected, then the selectAllCheck should also be checked. I can show rows in the selected state but the parent checkbox (which is the select all checkbox is not getting selected).
Please find the screenshots attached below
@Akshat55 @peterblazejewicz @kant @rapzo @cduran @Ratheeshrajan Could you please look into this and let me know if I am making any mistakes?
According to below link we can add this right ?
https://github.com/carbon-design-system/carbon-components-angular/blob/master/src/table/table.component.ts#L193
The text was updated successfully, but these errors were encountered: