question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Use columns array with a checkbox

See original GitHub issue

I’m submitting a … (check one with “x”)

[ ] bug report => search github for a similar issue or PR before submitting
[x] feature request
[ ] support request => Please do not submit support request here, post on Stackoverflow or Gitter

Current behavior Right now, if you want to add a checkbox, you have to add a column manually. If you do this with a dynamic column list, you either get exactly one column (the checkbox only) or your data, not both.

Expected behavior I would like to specify a property that just pre-pends a checkbox field on the table, without adding it to the HTML template.

What is the motivation / use case for changing the behavior? I have dynamic columns (people can choose what columns they want to see/edit), and I want them to also be able to multi select entries in the table.

  • Table version: 11.1.7

  • Angular version: 5.0.3

  • Browser: all

  • Language: all

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
gerhardboercommented, Jan 31, 2018

Although not clear from the documentation, you can add a checkbox column from the component class without having the columns defined in the template.

I’ve setup an example: https://stackblitz.com/edit/angular-klbxfe?file=app%2Fapp.component.ts

0reactions
jftsaraivacommented, Jan 27, 2020

Thanks,

I was looking for something different, I thought this example was about that. I need to show a checkbox in a boolean column instead of text: true / false. I’m trying to use cellTemplate, but as I load my definition from a .json file (in assets) I can’t use cellTemplate: this.templateX . I was hoping that this example was about that, unfortunately it is not. But thanks anyway.

Read more comments on GitHub >

github_iconTop Results From Across the Web

PHP How to split variables from an array into two columns of ...
Since I have about about 50 items in this array right now, I'd like to print the checkboxes into two columns. Thanks! –...
Read more >
Unable to build array for multiple checkbox select...
I'm trying to take a Sharepoint List I've created that contains 2 columns with multiple text selections from a drop-down and send the ......
Read more >
Table Selection with Checkboxes | JET Developer Cookbook
The selector component renders checkboxes in collections to support selection. This demo shows following table features: Single Row/Column selection ...
Read more >
Auto Add checkboxes - Google Groups
var cbValues = checkboxes.getValues(); //Get array of all the checkbox column cell values. //Logger.log(cbValues);.
Read more >
How to create multiple columns with checkboxes?
I have an array of data, and I want to create multiple rows of checkboxes for these values. So let's say I have...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found