Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/pluggableWidgets/combobox-web/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

### Fixed

- We fixed an issue with on change event firing unexpectedly when datasource type is set to database.

## [2.6.2] - 2025-10-29

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion packages/pluggableWidgets/combobox-web/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@mendix/combobox-web",
"widgetName": "Combobox",
"version": "2.6.2",
"version": "2.6.3",
"description": "Configurable Combo box widget with suggestions and autocomplete.",
"copyright": "© Mendix Technology BV 2025. All rights reserved.",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/pluggableWidgets/combobox-web/src/Combobox.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<caption>Selectable objects</caption>
<description />
</property>
<property key="optionsSourceDatabaseItemSelection" type="selection" dataSource="optionsSourceDatabaseDataSource" onChange="onChangeDatabaseEvent">
<property key="optionsSourceDatabaseItemSelection" type="selection" dataSource="optionsSourceDatabaseDataSource">
<caption>Selection type</caption>
<description />
<selectionTypes>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { ThreeStateCheckBoxEnum } from "@mendix/widget-plugin-component-kit/ThreeStateCheckBox";
import { ListAttributeValue, ObjectItem, SelectionMultiValue } from "mendix";
import { ActionValue, ListAttributeValue, ObjectItem, SelectionMultiValue } from "mendix";
import { executeAction } from "@mendix/widget-plugin-platform/framework/execute-action";
import {
ComboboxContainerProps,
LoadingTypeEnum,
Expand Down Expand Up @@ -33,6 +34,7 @@ export class DatabaseMultiSelectionSelector implements MultiSelector {
protected lazyLoader: LazyLoadProvider = new LazyLoadProvider();
private _objectsMap: Map<string, ObjectItem> = new Map();
selectedItemsSorting: SelectedItemsSortingEnum = "none";
private onChangeEvent?: ActionValue;

constructor(props: { filterInputDebounceInterval: number }) {
this.caption = new DatabaseCaptionsProvider(this._objectsMap);
Expand Down Expand Up @@ -124,6 +126,7 @@ export class DatabaseMultiSelectionSelector implements MultiSelector {
this.selection.setKeepSelection?.(() => true);
this.selectionMethod = props.selectionMethod;
this.selectedItemsSorting = props.selectedItemsSorting;
this.onChangeEvent = props.onChangeDatabaseEvent;

this.currentId = sortSelectedItems(
this.selection?.selection,
Expand Down Expand Up @@ -154,5 +157,6 @@ export class DatabaseMultiSelectionSelector implements MultiSelector {
if (newValue) {
this.selection?.setSelection(newValue);
}
executeAction(this.onChangeEvent);
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { EditableValue, ListAttributeValue, ObjectItem, SelectionSingleValue } from "mendix";
import { ActionValue, EditableValue, ListAttributeValue, ObjectItem, SelectionSingleValue } from "mendix";
import { executeAction } from "@mendix/widget-plugin-platform/framework/execute-action";
import {
ComboboxContainerProps,
LoadingTypeEnum,
Expand Down Expand Up @@ -32,6 +33,7 @@ export class DatabaseSingleSelectionSelector<T extends string | Big, R extends E
values: DatabaseValuesProvider;
protected _attr: R | undefined;
private selection?: SelectionSingleValue;
private onChangeEvent?: ActionValue;

constructor(props: { filterInputDebounceInterval: number }) {
this.caption = new DatabaseCaptionsProvider(this._objectsMap);
Expand Down Expand Up @@ -133,6 +135,7 @@ export class DatabaseSingleSelectionSelector<T extends string | Big, R extends E
this.customContentType = customContentType;
this.lazyLoading = lazyLoading;
this.loadingType = loadingType;
this.onChangeEvent = props.onChangeDatabaseEvent;

if (this.selection.selection === undefined) {
const objectId = this.options.getAll().find(option => {
Expand All @@ -151,5 +154,6 @@ export class DatabaseSingleSelectionSelector<T extends string | Big, R extends E
this.selection?.setSelection(this.options._optionToValue(objectId));
}
this.currentId = objectId;
executeAction(this.onChangeEvent);
}
}
2 changes: 1 addition & 1 deletion packages/pluggableWidgets/combobox-web/src/package.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<package xmlns="http://www.mendix.com/package/1.0/">
<clientModule name="Combobox" version="2.6.2" xmlns="http://www.mendix.com/clientModule/1.0/">
<clientModule name="Combobox" version="2.6.3" xmlns="http://www.mendix.com/clientModule/1.0/">
<widgetFiles>
<widgetFile path="Combobox.xml" />
</widgetFiles>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ export interface ComboboxContainerProps {
customEditabilityExpression: DynamicValue<boolean>;
readOnlyStyle: ReadOnlyStyleEnum;
onChangeEvent?: ActionValue;
onChangeDatabaseEvent?: ActionValue;
onEnterEvent?: ActionValue;
onLeaveEvent?: ActionValue;
onChangeFilterInputEvent?: ActionValue<{ filterInput: Option<string> }>;
Expand Down
Loading