Skip to content

Commit 9c9797c

Browse files
Andries-Smitvadymv-mendix
authored andcommitted
feat(bottom-sheet-native): add on change
1 parent 8fcb68e commit 9c9797c

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

Diff for: packages/pluggableWidgets/bottom-sheet-native/src/BottomSheet.editorConfig.ts

+1
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ export const getProperties = (values: any, defaultProperties: Properties): Prope
8989
"nativeImplementation",
9090
"itemsBasic",
9191
"triggerAttribute",
92+
"triggerAttributeChange",
9293
"modalRendering"
9394
]);
9495
if (!values.showFullscreenContent) {

Diff for: packages/pluggableWidgets/bottom-sheet-native/src/BottomSheet.xml

+7-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<enumerationValue key="expanding">Expanding</enumerationValue>
1616
</enumerationValues>
1717
</property>
18-
<property key="triggerAttribute" type="attribute" required="false">
18+
<property key="triggerAttribute" type="attribute" onChange="triggerAttributeChange" required="false">
1919
<caption>Trigger attribute</caption>
2020
<description>Defines if the modal bottom sheet is visible or not. Initially this value should be false. When set to true, the bottom sheet will be shown. When the bottom sheet is hidden, the trigger attribute value is set to false.</description>
2121
<attributeTypes>
@@ -86,6 +86,12 @@
8686
<description />
8787
</property>
8888
</propertyGroup>
89+
<propertyGroup caption="Events">
90+
<property key="triggerAttributeChange" type="action" required="false">
91+
<caption>On change</caption>
92+
<description>Called on change of the 'Trigger attribute'</description>
93+
</property>
94+
</propertyGroup>
8995
<propertyGroup caption="Common">
9096
<systemProperty key="Name"/>
9197
<systemProperty key="Visibility" />

Diff for: packages/pluggableWidgets/bottom-sheet-native/typings/BottomSheetProps.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,5 @@ export interface BottomSheetPreviewProps {
6060
fullscreenContent: { widgetCount: number; renderer: ComponentType<{ children: ReactNode; caption?: string }> };
6161
onOpen: {} | null;
6262
onClose: {} | null;
63+
triggerAttributeChange: {} | null;
6364
}

0 commit comments

Comments
 (0)