Addepar / Addepar/ember-table

Option to conditionally disable selection on some rows

Open
#642 1 comment 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
1.7k
Forks
351
Avg merge
1d 22h
Merged PRs (30d)
1

Description

While a table may generally want to use the ember-table row selection features, sometimes we want some rows to be selectable and some to not be. For example, I may have a collapsable tree where I only want the leaf nodes to be selectable and not the collapsable parent rows.

Right now the way I'm handling this is to hide the .et-toggle-select on these rows with CSS and then override the onClick action for the table rows to ignore clicks on the rows where I've hidden the selection checkbox.

It seems that it would be better if we could pass some option to ember-tr to disable row selection for some rows.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the ember-tr row-selection behavior and the table-row onClick path, using the existing .et-toggle-select handling as context. Define the option's expected behavior for mixed selectable and non-selectable rows, then add coverage showing that parent rows can be disabled while leaf rows remain selectable.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.