]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/dashboard: Improve workaround to redraw datatables 34413/head
authorVolker Theile <vtheile@suse.com>
Thu, 12 Sep 2019 11:37:03 +0000 (13:37 +0200)
committerVolker Theile <vtheile@suse.com>
Thu, 16 Apr 2020 08:34:20 +0000 (10:34 +0200)
commit2ae2bf8a5e7e009b043284c603b837ddca9c364a
treead04c6c332432fa7382346260e2123739aa7f4d3
parentc86dc667d4638b905a538b9e0b8f58397a206e68
mgr/dashboard: Improve workaround to redraw datatables

The current approach to workaround this issue is to fire a 'resize' event to force the datatable to redraw the grid with correct column widths. This approach is like using a sledgehammer to crack a nut. The new approach simply uses Angular's change-detection mechanism. The datatable is marked as changed and Angular will do the rest for us. This should also finally solve the error that variables have been changed after Angular's change-detection has been done.

Fixes: https://tracker.ceph.com/issues/41787
Signed-off-by: Volker Theile <vtheile@suse.com>
(cherry picked from commit 08a5ab12ce17de2b4e54d6990e930fa4973d6ee2)

# Conflicts:
# src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.ts