Skip to content

Commit 2e6f654

Browse files
committed
feat(bottom-sheet-native): add on change
1 parent 9a731ac commit 2e6f654

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

+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) {

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" />

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

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

0 commit comments

Comments
 (0)