[FEATURE-REQ] Ability to show default content in case of no data in the table body
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.7k
- Forks
- 351
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 1
Description
Great work on the add-on. Keep doing the great job.
There are cases where the data @rows that is bound to the ember-table is empty.
Example: when applying a particular filter, the result can be empty.
In cases like the above, we must have a provision to show some default content (text, illustration, etc.,) specified by the user in the parent component.
<EmberTable as |b|>
<table.body
...
@noRecordsText = "No data available for now. Please come back later."
@noRecordsImagePath = "/assets/images/no-results.svg"
@noRecordsComponent = "/my-components/no-results"
...>
</table.body>
</EmberTable>
(This also matches parity with ember-light-table in this particular aspect.)
Thanks in advance.
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 by tracing the <table.body> API in the example and how it receives the bound @rows data. Define how user-provided no-records text, image, or component should be selected when the filtered table has no rows, then verify that the configured default content appears without changing populated tables.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100