Skip to content

Commit

Permalink
fix: validate modified mei cells only
Browse files Browse the repository at this point in the history
Resolves: #77
  • Loading branch information
yinanazhou committed Jul 3, 2024
1 parent d594092 commit a5723e7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/CressView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import setBody from './utils/Template';
import { ModalWindow } from './utils/ModalWindow';
import { CressTable } from './Editor/CressTable';
import { ModalWindowInterface } from './Interfaces';
import { setSavedStatus, listenUnsavedChanges } from './utils/Unsaved';
import { listenUnsavedChanges } from './utils/Unsaved';
import { CressDoc } from './Types';

/**
Expand Down
6 changes: 4 additions & 2 deletions src/Editor/CressTable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,10 @@ export class CressTable {
dropdownMenu: true,
className: 'table-menu-btn',
licenseKey: 'non-commercial-and-evaluation',
afterChange() {
this.validateCells();
afterChange(_, source) {
if (source == 'loadData') {
this.validateCells();
}
},
beforeValidate: (value) => this.setProcessStatus(value),
afterValidate: (isValid) => this.setResultStatus(isValid),
Expand Down

0 comments on commit a5723e7

Please sign in to comment.