Skip to content

Commit

Permalink
hypertable v2: add support for empty_state_message
Browse files Browse the repository at this point in the history
  • Loading branch information
phndiaye committed Nov 21, 2024
1 parent fb451ce commit 2a89197
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
4 changes: 3 additions & 1 deletion addon/components/hyper-table-v2/cell-renderers/date.hbs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{{#if this.value}}
{{this.formattedDate}}
{{else}}
<span class="font-color-gray-500">
{{or @column.definition.empty_state_message ""}}
</span>
{{/if}}
4 changes: 3 additions & 1 deletion addon/components/hyper-table-v2/cell-renderers/numeric.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
</div>
{{else}}
<div class="fx-row fx-1 fx-malign-start">
<span class="font-color-gray-500">
{{or @column.definition.empty_state_message ""}}
</span>
</div>
{{/if}}
4 changes: 3 additions & 1 deletion addon/components/hyper-table-v2/cell-renderers/text.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@
{{this.value}}
</span>
{{else}}
<span class="font-color-gray-500">
</span>
{{/if}}
1 change: 1 addition & 0 deletions addon/core/interfaces/column.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export type ColumnDefinition = {
filterable_by: string[] | null;
facetable: boolean;
facetable_by: string[] | null;
empty_state_message?: string;
position?: {
sticky: boolean;
};
Expand Down

0 comments on commit 2a89197

Please sign in to comment.