Skip to content

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
kennethbruskiewicz committed Aug 23, 2024
1 parent 7c6ad0d commit 749f836
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/utils/1m.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,6 @@ const createRowDataManager = (hot, contextMenuCallback) => {
};

const handleChange = (hot, [col, oldVal, newVal]) => {
console.log('change', hot, [col, oldVal, newVal]);
hot.batch(() => {
const data = hot.getSourceData();
data.every((childRow, rowIndex) => {
Expand Down Expand Up @@ -312,7 +311,7 @@ function dispatchHandsontableUpdate(detail) {
}

function reselect(dh, row, prop) {
dh.hot.selectCell(row + 1, prop);
dh.hot.selectCell(row, prop);
dh.hot.runHooks('afterSelection', row, prop);
}

Expand All @@ -328,6 +327,7 @@ function parentBroadcastsCRUD(data_harmonizers, schema_tree) {
// broadcast CRUD
// Create and dispatch a custom event
propagatesChangesOnTheseKeys.forEach((shared_key) => {

data_harmonizers[node.name].hot.addHook(
'afterChange',
(changes, source) => {
Expand All @@ -348,6 +348,7 @@ function parentBroadcastsCRUD(data_harmonizers, schema_tree) {
}
}
);

// TODO: row insertion/deletion
// Add the beforeRemoveRow and afterRemoveRow hooks using addHook
const rowDataManager = createRowDataManager(
Expand Down Expand Up @@ -395,6 +396,7 @@ function parentBroadcastsCRUD(data_harmonizers, schema_tree) {
// undo_redo_callback('redo', action);
// });
// // TODO: copy/paste

});
} else {
console.warn('no parenthood defined', node.name);
Expand Down

0 comments on commit 749f836

Please sign in to comment.