native-pytech 1.0.68 → 1.0.69
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type Props from "./types";
|
|
3
|
-
declare function Component<T>({ data, keyExtractor, onDelete, onMove, renderItem }: Props<T>): React.JSX.Element;
|
|
3
|
+
declare function Component<T>({ data, keyExtractor, onDelete, onMove, renderItem, sectionProps, }: Props<T>): React.JSX.Element;
|
|
4
4
|
declare const _default: typeof Component;
|
|
5
5
|
export default _default;
|
|
@@ -3,7 +3,7 @@ import { moveDisabled, tag, deleteDisabled } from "@expo/ui/swift-ui/modifiers";
|
|
|
3
3
|
import React, { memo, useCallback, useState } from "react";
|
|
4
4
|
import Hooks from '../../../../../../../libs/constants/hooks';
|
|
5
5
|
import { useListEditable } from "../../../../context/ListEditable";
|
|
6
|
-
function Component({ data = [], keyExtractor, onDelete, onMove, renderItem }) {
|
|
6
|
+
function Component({ data = [], keyExtractor, onDelete, onMove, renderItem, sectionProps, }) {
|
|
7
7
|
// ---------------------- Variables ----------------------
|
|
8
8
|
const { enableMove, enableDelete } = useListEditable();
|
|
9
9
|
const [_data, setData] = useState(data ?? []);
|
|
@@ -24,7 +24,7 @@ function Component({ data = [], keyExtractor, onDelete, onMove, renderItem }) {
|
|
|
24
24
|
});
|
|
25
25
|
onMove?.({ listIndexes: sourceIndices, destinationIndex: adjustedDest });
|
|
26
26
|
}, [onMove]);
|
|
27
|
-
return (<Section>
|
|
27
|
+
return (<Section {...sectionProps}>
|
|
28
28
|
<List.ForEach onDelete={handleDelete} onMove={handleMove} modifiers={[moveDisabled(!enableMove), deleteDisabled(!enableDelete)]}>
|
|
29
29
|
{_data.map((item, index) => {
|
|
30
30
|
const key = keyExtractor?.(item) ?? index;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ViewModifier } from "@expo/ui/swift-ui/modifiers";
|
|
2
|
+
import { SectionProps } from "@expo/ui/swift-ui";
|
|
2
3
|
type Props<T> = {
|
|
3
4
|
/**
|
|
4
5
|
The data items to be rendered inside the list.
|
|
@@ -33,5 +34,9 @@ type Props<T> = {
|
|
|
33
34
|
item: T;
|
|
34
35
|
tagModifier: ViewModifier;
|
|
35
36
|
}) => React.ReactNode;
|
|
37
|
+
/**
|
|
38
|
+
The props to apply to the Section.
|
|
39
|
+
*/
|
|
40
|
+
sectionProps?: Omit<SectionProps, 'children'>;
|
|
36
41
|
};
|
|
37
42
|
export default Props;
|