You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have one doubt while integrating with angular. We have our own angular component and we need to integrate it like combobox or normal input field. Can anyone help on this?
I have one doubt while integrating with angular. We have our own angular component and we need to integrate it like combobox or normal input field. Can anyone help on this?
For Examaple:
// class litegraphDropdownNode extends LGraphNode {
// public dropdownOptions: { id: number; text: string; }[];
// public selectedOption: { id: number; text: string; };
// constructor() {
// super();
// // Define node properties
// this.addOutput("Output", "number");
// // Angular Material dropdown options
// this.dropdownOptions = [
// {id: 1, text: "Option 1"},
// {id: 2, text: "Option 2"},
// {id: 3, text: "Option 3"},
// ];
// // Default selected option
// this.selectedOption = this.dropdownOptions[0];
// }
// // Override onDrawForeground to render dropdown
// public onDrawForeground(ctx, canvas): void {
// // Render Angular Material dropdown
// const dropdown = document.createElement("div");
// dropdown.innerHTML =
// <dropdown-field class="rete-reference" // [value]="value" // [items]="items" // [existingItemsOnly]="!multiple" // [mode]="multiple ? 'multiple' : 'single'" // [listContainer]="'body'" // [itemValueKey]="'id'" // [itemTextKey]="'name'" // [maxListHeight]="'250px'" // [autofocus]="true" // listStyleClass="vm-predicates-graph__reference-list-container" // (valueChange)="updateValue($event)"> // </dropdown-field> //
;// }
// public updateValue(event: any): void {
// this.selectedOption = event;
// // Output the selected option value
// this.setOutputData(0, this.selectedOption);
// }
// // Override onExecute to handle node execution
// public onExecute(): void {
// // Output the selected option value
// this.setOutputData(0, this.selectedOption);
// }
// }
// LiteGraph.registerNodeType("custom/dropdownNode", litegraphDropdownNode);
The text was updated successfully, but these errors were encountered: