flameresttable 1.0.43 → 1.0.45

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flameresttable",
3
- "version": "1.0.43",
3
+ "version": "1.0.45",
4
4
  "main": "./src/plugin.ts",
5
5
  "repository": {
6
6
  "type": "git",
@@ -415,7 +415,13 @@ export default class FlameTable<T> {
415
415
  * @returns
416
416
  */
417
417
  public getSelectedRows() {
418
- return this.Rows.rows.filter((r: any) => r.selected).map((r: any) => r.item);
418
+ const res = [];
419
+ for (const key in this.RowsParams) {
420
+ const el = this.RowsParams[key];
421
+ if (el.selected)
422
+ res.push(el.item)
423
+ }
424
+ return res;
419
425
  }
420
426
 
421
427
  /**
@@ -52,7 +52,8 @@
52
52
  <label>
53
53
  <select class="minimal text-xs text-center text-slate-500" v-model="state.selectModel" @change="selectAction">
54
54
  <option :value="0">{{ state.opts.lang === 'ru' ? 'ДЕЙСТВИЯ' : 'ACTIONS' }}</option>
55
- <option :value="1">{{ state.opts.lang === 'ru' ? 'Выгрузить выбранные' : 'Export selected' }} [{{ 5 }}]
55
+ <option :value="1">{{ state.opts.lang === 'ru' ? 'Выгрузить выбранные' : 'Export selected' }} [{{
56
+ state.Table.getSelectedRows().length }}]
56
57
  </option>
57
58
  <option :value="2">{{ state.opts.lang === 'ru' ? 'Выгрузить всё' : 'Export all' }} [{{
58
59
  state.Table.Pager.total }}]</option>
@@ -114,7 +115,7 @@ const selectAction = () => {
114
115
  case 0:
115
116
  break;
116
117
  case 1:
117
-
118
+ state.Table.exportToXLS(true);
118
119
  break;
119
120
  case 2:
120
121
  state.Table.exportToXLS();