Skip to content

Commit 6caf5b0

Browse files
committed
chore(repeater-native): rename to empty placeholder
1 parent 20a1ab2 commit 6caf5b0

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

packages/pluggableWidgets/repeater-native/src/Repeater.editorConfig.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ export function getPreview(values: RepeaterPreviewProps, isDarkMode: boolean): S
3535
children: [
3636
{
3737
type: "DropZone",
38-
placeholder: "Content when Empty",
39-
property: values.contentEmpty
38+
placeholder: "No items placeholder: Place widgets here",
39+
property: values.emptyPlaceholder
4040
}
4141
]
4242
}

packages/pluggableWidgets/repeater-native/src/Repeater.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ export function Repeater(props: RepeaterProps<RepeaterStyle>): ReactElement {
1010
if (props.datasource.status === ValueStatus.Loading || !props.datasource.items) {
1111
return <View />;
1212
}
13-
const contentEmpty = props.datasource.items.length === 0 ? props.contentEmpty : null;
13+
const emptyPlaceholder = props.datasource.items.length === 0 ? props.emptyPlaceholder : null;
1414
return (
1515
<View style={styles.container}>
1616
{props.datasource.items.map((item, index) => (
1717
<Fragment key={`item_${index}`}>{props.content.get(item)}</Fragment>
1818
))}
19-
{contentEmpty}
19+
{emptyPlaceholder}
2020
</View>
2121
);
2222
}

packages/pluggableWidgets/repeater-native/src/Repeater.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
<caption>Content</caption>
1616
<description/>
1717
</property>
18-
<property key="contentEmpty" type="widgets" required="false">
19-
<caption>Content empty</caption>
18+
<property key="emptyPlaceholder" type="widgets" required="false">
19+
<caption>Empty placeholder</caption>
2020
<description/>
2121
</property>
2222
</propertyGroup>

packages/pluggableWidgets/repeater-native/typings/RepeaterProps.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export interface RepeaterProps<Style> {
1111
style: Style[];
1212
datasource: ListValue;
1313
content: ListWidgetValue;
14-
contentEmpty?: ReactNode;
14+
emptyPlaceholder?: ReactNode;
1515
}
1616

1717
export interface RepeaterPreviewProps {
@@ -25,5 +25,5 @@ export interface RepeaterPreviewProps {
2525
readOnly: boolean;
2626
datasource: {} | { type: string } | null;
2727
content: { widgetCount: number; renderer: ComponentType<{ caption?: string }> };
28-
contentEmpty: { widgetCount: number; renderer: ComponentType<{ caption?: string }> };
28+
emptyPlaceholder: { widgetCount: number; renderer: ComponentType<{ caption?: string }> };
2929
}

0 commit comments

Comments
 (0)