ember-table icon indicating copy to clipboard operation
ember-table copied to clipboard

[FEATURE-REQ] Ability to show default content in case of no data in the table body

Open happyvig opened this issue 5 years ago • 0 comments

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.

happyvig avatar Oct 30 '20 13:10 happyvig