@modeltables/fontawesome-vuetify 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/helpers/resources.ts +1 -0
- package/components/table/TableView.vue +13 -6
- package/dist/index.amd.ts +15 -15
- package/dist/index.esm.ts +1351 -1350
- package/package.json +1 -1
|
@@ -5,5 +5,6 @@ export const search = 'search';
|
|
|
5
5
|
export const itemSelection = 'itemSelection';
|
|
6
6
|
export const multiSelection = 'multiSelection';
|
|
7
7
|
export const selectedRow = 'selected-row';
|
|
8
|
+
export const unSelectedRow = 'unselected-row';
|
|
8
9
|
export const rowClass = 'row-class';
|
|
9
10
|
export const Id = 'Id';
|
|
@@ -5,7 +5,7 @@ import { faRefresh, faSearch, faIndent, faCheck } from '@fortawesome/free-solid-
|
|
|
5
5
|
import { faSquare } from '@fortawesome/free-regular-svg-icons';
|
|
6
6
|
import { HeaderModel, Options } from '@/components/models/tablemodels';
|
|
7
7
|
import { PaginatonModel } from '@/components/models/tablemodels';
|
|
8
|
-
import { change, itemSelection, load, multiSelection, rowClass, rowClick, search, selectedRow } from '@/components/helpers/resources';
|
|
8
|
+
import { change, itemSelection, load, multiSelection, rowClass, rowClick, search, selectedRow, unSelectedRow } from '@/components/helpers/resources';
|
|
9
9
|
import Date from '@/components/headerFilters/Date.vue';
|
|
10
10
|
import Search from '@/components/search/SearchView.vue';
|
|
11
11
|
import Text from '@/components/headerFilters/Text.vue';
|
|
@@ -154,6 +154,7 @@ export default {
|
|
|
154
154
|
faIndent: faIndent,
|
|
155
155
|
faCheck: faCheck,
|
|
156
156
|
faSquare: faSquare,
|
|
157
|
+
multiSelectionItems: [] as Object[],
|
|
157
158
|
lastItem: {},
|
|
158
159
|
completes: this.completes,
|
|
159
160
|
filters: { CurrentPage: 1, PerPage: 10, SortColumn: '', SortDirection: 1 } as any,
|
|
@@ -256,13 +257,18 @@ export default {
|
|
|
256
257
|
if(this.multiSelect){
|
|
257
258
|
item.selected = !item.selected;
|
|
258
259
|
|
|
259
|
-
if(
|
|
260
|
-
item.rowClass =
|
|
261
|
-
|
|
260
|
+
if(!this.multiSelectionItems.length){
|
|
261
|
+
item.rowClass = selectedRow;
|
|
262
|
+
this.multiSelectionItems = [item.dataItem];
|
|
263
|
+
}else if(item.selected){
|
|
262
264
|
item.rowClass = selectedRow;
|
|
265
|
+
this.multiSelectionItems = [...this.multiSelectionItems, item.dataItem]
|
|
266
|
+
}else{
|
|
267
|
+
item.rowClass = unSelectedRow;
|
|
268
|
+
this.multiSelectionItems = this.multiSelectionItems.filter(element => !isEqual(element, item.dataItem));
|
|
263
269
|
}
|
|
264
270
|
|
|
265
|
-
this.$emit(multiSelection, this.
|
|
271
|
+
this.$emit(multiSelection, this.multiSelectionItems);
|
|
266
272
|
}
|
|
267
273
|
},
|
|
268
274
|
filterValue(event: any, dataItem: any){
|
|
@@ -338,9 +344,10 @@ export default {
|
|
|
338
344
|
value.rowClass = selectedRow;
|
|
339
345
|
}else{
|
|
340
346
|
value.selected = false;
|
|
341
|
-
value.rowClass =
|
|
347
|
+
value.rowClass = unSelectedRow;
|
|
342
348
|
}
|
|
343
349
|
}
|
|
350
|
+
|
|
344
351
|
this.multiSelected = !this.multiSelected;
|
|
345
352
|
}
|
|
346
353
|
}
|