Skip to content

Commit 85276ba

Browse files
committed
Add bom body change event to EventHandler
Patch initially suggested here https://forum.kicad.info/t/interactive-html-bom-plugin-for-kicad-5-0/11713/235
1 parent 558f81e commit 85276ba

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

InteractiveHtmlBom/web/ibom.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -542,6 +542,14 @@ function populateBomBody() {
542542
first = false;
543543
}
544544
}
545+
EventHandler.emitEvent(
546+
IBOM_EVENT_TYPES.BOM_BODY_CHANGED_EVENT,
547+
{
548+
filter: filter,
549+
reflookup: reflookup,
550+
checkboxes: settings.checkboxes,
551+
bommode: settings.bommode,
552+
});
545553
}
546554

547555
function highlightPreviousRow() {

InteractiveHtmlBom/web/util.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,7 @@ const IBOM_EVENT_TYPES = {
525525
ALL: "all",
526526
HIGHLIGHT_EVENT: "highlightEvent",
527527
CHECKBOX_CHANGE_EVENT: "checkboxChangeEvent",
528+
BOM_BODY_CHANGED_EVENT: "bomBodyChangedEvent",
528529
}
529530

530531
const EventHandler = {

0 commit comments

Comments
 (0)