Skip to content

Commit 1028de3

Browse files
authored
Merge branch 'main' into fix/DG-col-selector-accessibility
2 parents 6ad1b1a + aa8e567 commit 1028de3

12 files changed

Lines changed: 53 additions & 17 deletions

File tree

packages/pluggableWidgets/color-picker-web/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66

77
## [Unreleased]
88

9+
## [2.1.5] - 2026-03-06
10+
911
### Fixed
1012

1113
- We fixed an issue where the widget would still change values in the previous Data View context after a context switch in the "listen to widget" setup.

packages/pluggableWidgets/color-picker-web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@mendix/color-picker-web",
33
"widgetName": "ColorPicker",
4-
"version": "2.1.4",
4+
"version": "2.1.5",
55
"description": "Change a color using a color input",
66
"copyright": "© Mendix Technology BV 2025. All rights reserved.",
77
"license": "Apache-2.0",

packages/pluggableWidgets/color-picker-web/src/package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8" ?>
22
<package xmlns="http://www.mendix.com/package/1.0/">
3-
<clientModule name="ColorPicker" version="2.1.4" xmlns="http://www.mendix.com/clientModule/1.0/">
3+
<clientModule name="ColorPicker" version="2.1.5" xmlns="http://www.mendix.com/clientModule/1.0/">
44
<widgetFiles>
55
<widgetFile path="ColorPicker.xml" />
66
</widgetFiles>

packages/pluggableWidgets/combobox-web/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66

77
## [Unreleased]
88

9+
### Added
10+
11+
- We introduced a new "On change" action in Database mode that fires only when the selection changes, unlike the previous behavior that fired on initialization.
12+
13+
### Changed
14+
15+
- We renamed the "On change" action in Database mode to "On selection" to better describe its actual behavior (fires on initialization and selection changes).
16+
917
## [2.7.2] - 2026-01-28
1018

1119
### Fixed

packages/pluggableWidgets/combobox-web/src/Combobox.editorConfig.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ export function getProperties(
107107
"selectionMethod",
108108
"selectAllButton",
109109
"selectAllButtonCaption",
110-
"onChangeEvent",
111110
...ASSOCIATION_SOURCE_CONFIG
112111
]);
113112
if (values.optionsSourceDatabaseDataSource === null) {
@@ -140,6 +139,10 @@ export function getProperties(
140139
if (values.customEditability !== "conditionally") {
141140
hidePropertiesIn(defaultProperties, values, ["customEditabilityExpression"]);
142141
}
142+
143+
// hide generic On change event when value is not saved anywhere.
144+
// Users should use "On selection" that is assigned to the selection API (onChangeDatabaseEvent)
145+
hidePropertiesIn(defaultProperties, values, ["onChangeEvent"]);
143146
} else {
144147
hidePropertiesIn(defaultProperties, values, ["customEditability", "customEditabilityExpression"]);
145148
}

packages/pluggableWidgets/combobox-web/src/Combobox.xml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@
104104
<!-- END CAPTIONS -->
105105
</propertyGroup>
106106
<propertyGroup caption="Store value">
107-
<property key="optionsSourceDatabaseValueAttribute" type="attribute" dataSource="optionsSourceDatabaseDataSource">
108-
<caption>Value</caption>
107+
<property key="databaseAttributeString" type="attribute" setLabel="true" required="false">
108+
<caption>Target</caption>
109109
<description />
110110
<attributeTypes>
111111
<attributeType name="String" />
@@ -114,8 +114,8 @@
114114
<attributeType name="Enum" />
115115
</attributeTypes>
116116
</property>
117-
<property key="databaseAttributeString" type="attribute" setLabel="true" required="false">
118-
<caption>Target attribute</caption>
117+
<property key="optionsSourceDatabaseValueAttribute" type="attribute" dataSource="optionsSourceDatabaseDataSource">
118+
<caption>Value</caption>
119119
<description />
120120
<attributeTypes>
121121
<attributeType name="String" />
@@ -314,12 +314,14 @@
314314

315315
<propertyGroup caption="Events">
316316
<property key="onChangeEvent" type="action" required="false">
317+
<!-- this event is called manually in the code, not attached to anything -->
317318
<caption>On change</caption>
318319
<description />
319320
</property>
320321
<property key="onChangeDatabaseEvent" type="action" required="false">
321-
<caption>On change</caption>
322-
<description />
322+
<!-- this event is tied to the Selection API property, fired automatically -->
323+
<caption>On selection</caption>
324+
<description>This event happens when "selection of" this widget changes or initializes.</description>
323325
</property>
324326
<property key="onEnterEvent" type="action" required="false">
325327
<caption>On enter</caption>

packages/pluggableWidgets/combobox-web/src/helpers/Database/DatabaseSingleSelectionSelector.ts

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { EditableValue, ListAttributeValue, ObjectItem, SelectionSingleValue } from "mendix";
1+
import { ActionValue, EditableValue, ListAttributeValue, ObjectItem, SelectionSingleValue } from "mendix";
22
import {
33
ComboboxContainerProps,
44
LoadingTypeEnum,
@@ -11,6 +11,7 @@ import { DatabaseCaptionsProvider } from "./DatabaseCaptionsProvider";
1111
import { DatabaseOptionsProvider } from "./DatabaseOptionsProvider";
1212
import { DatabaseValuesProvider } from "./DatabaseValuesProvider";
1313
import { extractDatabaseProps, getReadonly } from "./utils";
14+
import { executeAction } from "@mendix/widget-plugin-platform/framework/execute-action";
1415

1516
export class DatabaseSingleSelectionSelector<T extends string | Big, R extends EditableValue<T>>
1617
implements SingleSelector
@@ -30,6 +31,7 @@ export class DatabaseSingleSelectionSelector<T extends string | Big, R extends E
3031

3132
validation?: string = undefined;
3233
values: DatabaseValuesProvider;
34+
private onChangeEvent?: ActionValue;
3335
protected _attr: R | undefined;
3436
private selection?: SelectionSingleValue;
3537

@@ -52,14 +54,16 @@ export class DatabaseSingleSelectionSelector<T extends string | Big, R extends E
5254
filterType,
5355
lazyLoading,
5456
loadingType,
55-
valueSourceAttribute
57+
valueSourceAttribute,
58+
onChangeEvent
5659
} = extractDatabaseProps(props);
5760

5861
if (ds.status === "loading" && (!lazyLoading || ds.limit !== Infinity)) {
5962
return;
6063
}
6164

6265
this._attr = targetAttribute as R;
66+
this.onChangeEvent = onChangeEvent;
6367
this.readOnly = getReadonly(targetAttribute, props.customEditability, props.customEditabilityExpression);
6468
this.lazyLoader.updateProps(ds);
6569
this.lazyLoader.setLimit(
@@ -144,9 +148,19 @@ export class DatabaseSingleSelectionSelector<T extends string | Big, R extends E
144148
}
145149
}
146150

151+
setAttributeValue(value: T): void {
152+
if (this._attr) {
153+
const oldValue = this._attr.value;
154+
this._attr.setValue(value);
155+
if (!_valuesIsEqual(oldValue, value)) {
156+
executeAction(this.onChangeEvent);
157+
}
158+
}
159+
}
160+
147161
setValue(objectId: string | null): void {
148162
const value = this.values.get(objectId) as T;
149-
this._attr?.setValue(value);
163+
this.setAttributeValue(value);
150164
if (objectId !== (this.selection?.selection?.id ?? "")) {
151165
this.selection?.setSelection(this.options._optionToValue(objectId));
152166
}

packages/pluggableWidgets/combobox-web/src/helpers/Database/utils.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import {
2+
ActionValue,
23
DynamicValue,
34
EditableValue,
45
ListAttributeValue,
@@ -29,6 +30,7 @@ type ExtractionReturnValue = {
2930
loadingType: LoadingTypeEnum;
3031
valueSourceAttribute: ListAttributeValue<string | Big> | undefined;
3132
filterInputDebounceInterval: number;
33+
onChangeEvent: ActionValue | undefined;
3234
};
3335

3436
export function extractDatabaseProps(props: ComboboxContainerProps): ExtractionReturnValue {
@@ -72,6 +74,8 @@ export function extractDatabaseProps(props: ComboboxContainerProps): ExtractionR
7274
}
7375
}
7476

77+
const onChangeEvent = props.onChangeEvent;
78+
7579
return {
7680
targetAttribute,
7781
captionProvider: captionType === "attribute" ? captionAttribute : captionExpression,
@@ -85,7 +89,8 @@ export function extractDatabaseProps(props: ComboboxContainerProps): ExtractionR
8589
lazyLoading,
8690
loadingType,
8791
valueSourceAttribute,
88-
filterInputDebounceInterval
92+
filterInputDebounceInterval,
93+
onChangeEvent
8994
};
9095
}
9196

packages/pluggableWidgets/combobox-web/typings/ComboboxProps.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ export interface ComboboxContainerProps {
6363
optionsSourceDatabaseCaptionAttribute?: ListAttributeValue<string>;
6464
optionsSourceAssociationCaptionExpression?: ListExpressionValue<string>;
6565
optionsSourceDatabaseCaptionExpression?: ListExpressionValue<string>;
66-
optionsSourceDatabaseValueAttribute?: ListAttributeValue<string | Big>;
6766
databaseAttributeString?: EditableValue<string | Big>;
67+
optionsSourceDatabaseValueAttribute?: ListAttributeValue<string | Big>;
6868
attributeAssociation: ReferenceValue | ReferenceSetValue;
6969
optionsSourceAssociationDataSource?: ListValue;
7070
staticAttribute: EditableValue<string | Big | boolean | Date>;
@@ -120,8 +120,8 @@ export interface ComboboxPreviewProps {
120120
optionsSourceDatabaseCaptionAttribute: string;
121121
optionsSourceAssociationCaptionExpression: string;
122122
optionsSourceDatabaseCaptionExpression: string;
123-
optionsSourceDatabaseValueAttribute: string;
124123
databaseAttributeString: string;
124+
optionsSourceDatabaseValueAttribute: string;
125125
attributeAssociation: string;
126126
optionsSourceAssociationDataSource: {} | { caption: string } | { type: string } | null;
127127
staticAttribute: string;

packages/pluggableWidgets/rich-text-web/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66

77
## [Unreleased]
88

9+
## [4.11.2] - 2026-03-05
10+
911
### Fixed
1012

1113
- We fixed an issue where hyperlink tag does not read target attribute when edited from code viewer.

0 commit comments

Comments
 (0)