Skip to content

Commit 132cf17

Browse files
committed
feat(bottom-sheet-native): add on change
1 parent e19655a commit 132cf17

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ export function getProperties(values: any, defaultProperties: Properties): Prope
106106
"nativeImplementation",
107107
"itemsBasic",
108108
"triggerAttribute",
109+
"triggerAttributeChange",
109110
"modalRendering"
110111
]);
111112
if (!values.showFullscreenContent) {

packages/pluggableWidgets/bottom-sheet-native/src/BottomSheet.xml

Lines changed: 7 additions & 1 deletion
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" />

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,5 @@ export interface BottomSheetPreviewProps {
5656
fullscreenContent: { widgetCount: number; renderer: ComponentType<{ caption?: string }> };
5757
onOpen: {} | null;
5858
onClose: {} | null;
59+
triggerAttributeChange: {} | null;
5960
}

0 commit comments

Comments
 (0)