set() on onSelect() action causes ember-table rows to be cleared.
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.7k
- Forks
- 351
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 1
Description
Hey Chris, I have a question. I have a basic ember-table execution that loads data as intended, but when I do an onSelect action, it clears out my rows. Is there something that my onSelect is doing incorrectly?
Basically this is my ember-table body:
{{#table.body
rows=workingModel
rowSelectionMode='single'
checkboxSelectionMode='none'
selection=selectedRow
onSelect=(action 'selectRow')
as |table-body index|}}
{{table-body.row class="table-body-row" }}
{{/table.body}}
And this is what the action selectRow does:
selectRow: function(selection) {
let previousPartName=this.get('selectedPartName');
this.set('selectedRow',selection);
this.set('selectedPartName', selection);
},
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the provided table.body usage and the selectRow action, then reproduce the issue with rows=workingModel and the shown selection settings. Trace why setting selectedRow or selectedPartName causes the rows to clear; done means selecting a row leaves the table rows intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100