You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+31Lines changed: 31 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -289,6 +289,33 @@ Alternatively, you skip calling `this.bubbleAction` in the cell component's Java
289
289
290
290
This will directly bubble the action with name `myActionName` to the parent of the `fixtable-grid` component, passing along any additional arguments that follow the action name.
291
291
292
+
### Additional Custom Components
293
+
294
+
#### Footer Component
295
+
296
+
You can supply your own `footerComponent` which will be rendered in place of the default `fixtable-footer` component. The following properties will be made available to your custom footer:
297
+
298
+
* `currentPage` - integer value of the currently selected page (starting at 1)
299
+
* `totalRows` - integer value of the total number of rows; if you're using server-side paging, this will be equal to `totalRowsOnServer`, otherwise it's the number of rows in the current filtered content array
300
+
* `totalPages` - integer value of the number of available pages given the current `pageSize` and `totalRows`
301
+
* `selectedDataRows` - array of the currently selected row objects
302
+
* `pageSize` - integer value of the number of items in each page
303
+
* `pageSizeOptions` - array of integers which can optionally be used to provide the user an affordance for changing `pageSize`
304
+
* `isLoading` - boolean value to indicate when a new page is being loaded (it's up to your `onReloadContent` method to update this value)
305
+
* `goToNextPage` - action which your component may invoke to increment the currentPage
306
+
* `goToPreviousPage` - action which your component may invoke to decrement the currentPage
307
+
* `bubbleAction` - action which your component may invoke to bubble actions up to the consumer of the fixtable-grid (this works the same as custom cell components; see [Bubbling Actions from Custom Cell components](#bubbling-actions-from-custom-cell-components) above)
308
+
309
+
#### Empty State Component
310
+
311
+
You can supply your own `emptyStateComponent` which will be rendered in place of the default `fixtable-empty-state` component when the content array is empty. You can also supply an object using the `emptyStateComponentValues` property with dynamic values to be passed along to your component as `values`.
312
+
313
+
The default empty state component simply shows a message, centered vertically and horizontally within Fixtable. This message defaults to "No data available", but you can override it by using the `emptyStateComponentValues` property to set an object with a `nullMessage` property. For example:
314
+
315
+
```
316
+
{{fixtable-grid emptyStateComponentValues={nullMessage:"Nothing to see here!"}}}
317
+
```
318
+
292
319
### Filtering
293
320
294
321
Fixtable supports filtering the displayed rows, either by search text or by selected option. To set this up, add a filter property to the column definition.
@@ -609,6 +636,10 @@ Because "expanded" rows are actually rendered as two table rows, Fixtable takes
609
636
* `hover` - present on both row elements when the user's cursor is hovering over _either_ row element (you should use this class rather than relying on the `:hover` pseudo-class if you want to use hover styles with expanded rows)
610
637
* `active` - present on both row elements if the row is selected (see [Row Selection](#row-selection) above)
611
638
639
+
### Debugging
640
+
641
+
Fixtable-Ember utilizes the core [Fixtable](https://github.com/MyPureCloud/fixtable-core) library to handle the low-level DOM manipulation required for the fixed-header effect, ensuring Fixtable is styled to match your application's tables, etc. If you notice rendering issues, they're likely to originate in this core library and not Fixtable-Ember itself. If you set the `debugMode` property to `true` on your `fixtable-grid` component, it will enable debug logs on its internal `Fixtable` object which may be helpful in diagnosing issues.
Ember.Logger.warn('Deprecation warning: use emptyStateComponentValues instead of nullMessage. Support will be dropped in fixtable-ember v4.x. See https://github.com/MyPureCloud/fixtable-ember#empty-state-component for more info.');
0 commit comments