From b634c50a521adf18678a912d11f56bdb1a46b8dd Mon Sep 17 00:00:00 2001 From: Sergey Krylov Date: Tue, 19 Jul 2022 11:29:25 +0500 Subject: [PATCH] little fixes --- src/components/table/table.template.ts | 3 +- src/components/toolbar/toolbar.template.ts | 34 +++++++++++----------- src/constants.ts | 6 ++-- src/core/ExcelComponent.ts | 3 +- 4 files changed, 24 insertions(+), 22 deletions(-) diff --git a/src/components/table/table.template.ts b/src/components/table/table.template.ts index a603e9a..c586d17 100644 --- a/src/components/table/table.template.ts +++ b/src/components/table/table.template.ts @@ -7,7 +7,8 @@ function createCell(cellContent = '', colIndex = 1, rowIndex = 1) { return `
- add_circle -
- `; -} - -function createRemoveRowButton() { - return ` -
- remove_circle -
- `; -} +// function createAddRowButton() { +// return ` +//
+// add_circle +//
+// `; +// } +// +// function createRemoveRowButton() { +// return ` +//
+// remove_circle +//
+// `; +// } diff --git a/src/constants.ts b/src/constants.ts index 9f1ffaf..7ed897f 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -38,14 +38,14 @@ export const initialState: StateType = { currentText: 'initial text', id: '0', tableSize: { - col: 10, - row: 10, + col: 20, + row: 30, }, }; export function getNormalizeInitialState(params: string): StateType { const state = storage(storageName(params)); - if (!state) return initialState; + // if (!state) return initialState; return { ...initialState, diff --git a/src/core/ExcelComponent.ts b/src/core/ExcelComponent.ts index 364528b..f7eac3d 100644 --- a/src/core/ExcelComponent.ts +++ b/src/core/ExcelComponent.ts @@ -51,8 +51,9 @@ export abstract class ExcelComponent extends DomListener { this.store?.dispatchToStore(action); } + // eslint-disable-next-line @typescript-eslint/no-unused-vars storeChanged(args: StateType) { - console.log('CHANGE STORE: ', args, ' in component ', this.name); + // console.log('CHANGE STORE: ', args, ' in component ', this.name); } isWatching(key: keyof StateType) {