inputs icon indicating copy to clipboard operation
inputs copied to clipboard

Table option to suppress checkbox column

Open CobusT opened this issue 3 years ago • 4 comments

I see many uses of Table to just view the results in a table format without the need to have the table drive further down-selection. Although the checkboxes on the left are great for having the table drive the next steps (selected rows) it would be great to have an option to have the table without this column.

Perhaps an option like 'selectable' with a default of true?

CobusT avatar Apr 16 '21 05:04 CobusT

"disabled" would seem like a sensible choice?

mootari avatar Apr 18 '21 17:04 mootari

I think disabled would retain the checkboxes, but in a disabled state. I think I’d prefer a select option.

mbostock avatar May 06 '21 00:05 mbostock

For now, as a workaround, I am adding this style sheet to Inputs.table where I want to hide the first column:

 .nocheckbox td:nth-child(1), .nocheckbox th:nth-child(1) {
    display: none;
  }
  .nocheckbox td:nth-child(2), .nocheckbox th:nth-child(2) {
    padding-left: 0px;
  }

CobusT avatar Sep 21 '21 16:09 CobusT

For a css fix that wouldn't break the layout, we could consider visibility: hidden which should just toggle the visibility without affecting layout. https://developer.mozilla.org/en-US/docs/Web/CSS/visibility

shancarter avatar Apr 26 '22 18:04 shancarter