little fixes

This commit is contained in:
Sergey Krylov 2022-07-19 11:29:25 +05:00
parent 579694c829
commit b634c50a52
4 changed files with 24 additions and 22 deletions

View File

@ -7,7 +7,8 @@ function createCell(cellContent = '', colIndex = 1, rowIndex = 1) {
return `
<div
class="cell"
contenteditable
contenteditable
spellcheck="false"
data-col="${colIndex}"
data-id="${rowIndex}:${colIndex}"
data-type="cell"

View File

@ -88,8 +88,8 @@ export function createToolbar(state: ToolbarStateType): string {
buttons.push(increaseDecreaseFontSize);
buttons.push(selectGroup);
buttons.push(createAddRowButton());
buttons.push(createRemoveRowButton());
// buttons.push(createAddRowButton());
// buttons.push(createRemoveRowButton());
return buttons.join('');
}
@ -171,18 +171,18 @@ function createButtonFromConfig(btnConfig: ButtonConfigType) {
`;
}
function createAddRowButton() {
return `
<div class="button" data-add-row-btn>
<i class="material-icons" data-add-row-btn>add_circle</i>
</div>
`;
}
function createRemoveRowButton() {
return `
<div class="button" data-remove-row-btn>
<i class="material-icons" data-remove-row-btn>remove_circle</i>
</div>
`;
}
// function createAddRowButton() {
// return `
// <div class="button" data-add-row-btn>
// <i class="material-icons" data-add-row-btn>add_circle</i>
// </div>
// `;
// }
//
// function createRemoveRowButton() {
// return `
// <div class="button" data-remove-row-btn>
// <i class="material-icons" data-remove-row-btn>remove_circle</i>
// </div>
// `;
// }

View File

@ -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,

View File

@ -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) {