diff options
| author | Yoshie Muranaka <yoshiemuranaka@gmail.com> | 2019-09-16 10:33:16 -0700 |
|---|---|---|
| committer | Yoshie Muranaka <yoshiemuranaka@gmail.com> | 2019-09-24 10:27:00 -0700 |
| commit | 49001e25fb1e1abd22e56023992a53c10b4d7055 (patch) | |
| tree | 2f7ac750f5e3bda78d4be63d785fa17d3b39169a /app/common/components/table | |
| parent | 5b8cef81cfa896ecdb0b6ad9d43c78d67d087a62 (diff) | |
| download | phosphor-webui-49001e25fb1e1abd22e56023992a53c10b4d7055.tar.gz phosphor-webui-49001e25fb1e1abd22e56023992a53c10b4d7055.zip | |
Add batch actions to local user table
Add ability to remove, enable, disable local users in bulk.
- Updates to table-actions component to fix flickering issue
by including track by $index in ng-repeat
Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com>
Change-Id: I67039e9b9d9cf7debe9f6ef87e71210bd4b64251
Diffstat (limited to 'app/common/components/table')
| -rw-r--r-- | app/common/components/table/table-actions.js | 6 | ||||
| -rw-r--r-- | app/common/components/table/table.html | 1 | ||||
| -rw-r--r-- | app/common/components/table/table.js | 1 |
3 files changed, 5 insertions, 3 deletions
diff --git a/app/common/components/table/table-actions.js b/app/common/components/table/table-actions.js index e1e47ec..d76d5e5 100644 --- a/app/common/components/table/table-actions.js +++ b/app/common/components/table/table-actions.js @@ -58,9 +58,9 @@ window.angular && (function(angular) { }; /** - * onInit Component lifecycle hook + * onChanges Component lifecycle hook */ - this.$onInit = () => { + this.$onChanges = () => { this.actions = setActions(this.actions); }; }; @@ -73,7 +73,7 @@ window.angular && (function(angular) { class="btn btn-tertiary" type="button" aria-label="{{action.type}}" - ng-repeat="action in $ctrl.actions" + ng-repeat="action in $ctrl.actions track by $index" ng-disabled="!action.enabled" ng-click="$ctrl.onClick(action.type)"> <icon ng-if="action.file !== null" ng-file="{{action.file}}"></icon> diff --git a/app/common/components/table/table.html b/app/common/components/table/table.html index 7d906a1..387b18d 100644 --- a/app/common/components/table/table.html +++ b/app/common/components/table/table.html @@ -99,6 +99,7 @@ <td ng-if="$ctrl.rowActionsEnabled" class="bmc-table__cell bmc-table__row-actions"> <table-actions + ng-if="row.actions" actions="row.actions" emit-action="$ctrl.onEmitRowAction(action, row)"> </table-actions> diff --git a/app/common/components/table/table.js b/app/common/components/table/table.js index 2063555..a382429 100644 --- a/app/common/components/table/table.js +++ b/app/common/components/table/table.js @@ -288,6 +288,7 @@ window.angular && (function(angular) { const dataChange = onChangesObj.data; if (dataChange) { prepData(); + deselectAllRows(); } }; }; |

