Skip to content

Commit

Permalink
WIP: on-row-change validation
Browse files Browse the repository at this point in the history
  • Loading branch information
kennethbruskiewicz committed Sep 16, 2024
1 parent d8b7626 commit c4b887a
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions lib/utils/1m.js
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,6 @@ const changesToRows = (changes) => {

const bindChangeEmitter = (appContext) => (dh) => {
dh.hot.addHook('afterChange', (changes, source) => {
console.error('afterChange', changes, source);
if (source === 'loadData') return;
else if (source === 'edit' && changes) {
// Array to store indices of changed cells
Expand Down Expand Up @@ -824,12 +823,7 @@ export const setup1M =
makeColumnsReadOnly(appContext)(dhs[dh]);
bindReadEmitter(appContext)(dhs[dh]);
if (DEBUG) bindKeyConstraintValidation(appContext)(dhs[dh]);
createRowFocusTracker(dhs[dh], () =>
dispatchHandsontableUpdate(ACTION.VALIDATE, {
emitted_by: dh,
target: dh,
})
);
createRowFocusTracker(dhs[dh], () => dhs[dh].validate());
bindChangeEmitter(appContext)(dhs[dh]); // create, update, delete
bindActionHandler(appContext)(dhs[dh]);
}
Expand Down

0 comments on commit c4b887a

Please sign in to comment.