Skip to content

Commit e161a6b

Browse files
vedangimittalrfrandse
authored andcommitted
Fixed vue3 table issues (#508)
* Selected rows issue - No of selected rows not clearing on changing the page Signed-off-by: Vedangi Mittal <[email protected]> * Fixed sort issue - Fixed sort issue * Fixed lint error - Fixed lint error * Removed :sort-by - Removed :sort-by --------- Signed-off-by: Vedangi Mittal <[email protected]>
1 parent 568720d commit e161a6b

File tree

11 files changed

+8
-9
lines changed

11 files changed

+8
-9
lines changed

src/components/Global/LoadingBar.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ const hideLoadingBar = () => {
7676
<style lang="scss" scoped>
7777
.progress {
7878
position: relative;
79-
top:0px;
79+
top: 0px;
8080
left: 0;
8181
right: 0;
8282
bottom: -0.4rem;

src/views/HardwareStatus/Sensors/Sensors.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
no-select-on-click
4545
hover
4646
sticky-header="75vh"
47-
:sort-by="[{ key: 'status', order: 'asc' }]"
4847
show-empty
4948
:no-border-collapse="true"
5049
:items="filteredSensors"
@@ -249,6 +248,7 @@ const tableFilters = ref([
249248
]);
250249
251250
onBeforeRouteLeave(() => {
251+
eventBus.emit('clear-selected');
252252
hideLoader();
253253
});
254254

src/views/Logs/DeconfigurationRecords/DeconfigurationRecords.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
hover
5454
show-empty
5555
sticky-header="75vh"
56-
:sort-by="[{ key: 'id', order: 'asc' }]"
5756
sort-desc.sync="status"
5857
:fields="fields"
5958
:items="filteredLogs"
@@ -337,6 +336,7 @@ const openModal = ref(false);
337336
const isAllSelected = ref(false);
338337
339338
onBeforeRouteLeave(() => {
339+
eventBus.emit('clear-selected');
340340
isBusy.value = false;
341341
hideLoader();
342342
});

src/views/Logs/Dumps/Dumps.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@
9191
selectable
9292
no-select-on-click
9393
responsive="md"
94-
:sort-by="[{ key: 'dateTime', order: 'asc' }]"
9594
sticky-header="75vh"
9695
:fields="fields"
9796
:items="filteredDumps"

src/views/Logs/EventLogs/EventLogs.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@
7070
hover
7171
sticky-header="75vh"
7272
show-empty
73-
:sort-by="[{ key: 'id', order: 'asc' }]"
7473
:fields="fields"
7574
:items="filteredLogs"
7675
:empty-text="
@@ -347,6 +346,7 @@ export default {
347346
beforeRouteLeave(to, from, next) {
348347
// Hide loader if the user navigates to another page
349348
// before request is fulfilled.
349+
eventBus.emit('clear-selected');
350350
useLoadingBar().hideLoader();
351351
next();
352352
},

src/views/SecurityAndAccess/Sessions/Sessions.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
no-select-on-click
4848
hover
4949
sticky-header="75vh"
50-
:sort-by="[{ key: 'clientID', order: 'asc' }]"
5150
show-empty
5251
:fields="fields"
5352
:items="allConnections"
@@ -231,6 +230,7 @@ const batchActions = ref([
231230
]);
232231
233232
onBeforeRouteLeave(() => {
233+
eventBus.emit('clear-selected');
234234
hideLoader();
235235
});
236236

src/views/SecurityAndAccess/UserManagement/ModalUser.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ function handleSubmit() {
403403
let userData = {};
404404
405405
if (newUser.value) {
406-
if(!notReadyOnly.value && form.value.privilege === null) {
406+
if (!notReadyOnly.value && form.value.privilege === null) {
407407
form.value.privilege = 'ReadOnly';
408408
}
409409
v$.value.$touch();

src/views/SecurityAndAccess/UserManagement/UserManagement.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ import useToastComposable from '@/components/Composables/useToastComposable';
158158
import stores from '@/store';
159159
160160
onBeforeRouteLeave(() => {
161+
eventBus.emit('clear-selected');
161162
hideLoader();
162163
});
163164

src/views/Settings/HardwareDeconfiguration/MemoryDimms.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
sort-icon-left
1515
hover
1616
no-sort-reset
17-
:sort-by="[{ key: 'status', order: 'asc' }]"
1817
show-empty
1918
sticky-header="75vh"
2019
:no-border-collapse="true"

src/views/Settings/HardwareDeconfiguration/ProcessorCores.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
sort-icon-left
2727
hover
2828
no-sort-reset
29-
:sort-by="[{ key: 'status', order: 'asc' }]"
3029
show-empty
3130
sticky-header="75vh"
3231
:no-border-collapse="true"

0 commit comments

Comments
 (0)