-
Notifications
You must be signed in to change notification settings - Fork 7
feat(oui-datagrid): add a way to customize empty placeholder #254
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice but update the property table 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no need to commit the build files. Those are generated with each release.
Could you remove them ?
If needed in another project, prefer using another branch (eg. build/empty-text-datagrid)
packages/oui-datagrid/README.md
Outdated
| `rows` | array | <? | yes | n/a | n/a | rows to show | ||
| `rows-loader` | function | &? | yes | n/a | n/a | gets all rows (returns a promise with all rows) | ||
| `row-loader` | function | &? | yes | n/a | n/a | gets row details (returns a promise with details) | ||
| `empty-text` | string | @? | no | n/a | n/a | custom placeholder text when there is no data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should go with empty-placeholder
, since we use emptyPlaceholder
in the translations provider
> | ||
<span ng-if="!$ctrl.loading && !$ctrl.firstLoading" | ||
ng-bind="$ctrl.config.translations.emptyPlaceholder"></span> | ||
ng-bind="$ctrl.emptyText || $ctrl.config.translations.emptyPlaceholder"></span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be one-time binded.
Don't forget to update the API table too :)
dee0b7f
to
b9ffb59
Compare
Add a way to specify the text when there's no elements in a datagrid.