react-crud-mobile 1.3.183 → 1.3.184
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.
- package/dist/react-crud-mobile.cjs.development.js +25 -8
- package/dist/react-crud-mobile.cjs.development.js.map +1 -1
- package/dist/react-crud-mobile.cjs.production.min.js +1 -1
- package/dist/react-crud-mobile.cjs.production.min.js.map +1 -1
- package/dist/react-crud-mobile.esm.js +25 -8
- package/dist/react-crud-mobile.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/elements/core/UIOrder.tsx +24 -5
package/package.json
CHANGED
@@ -60,20 +60,39 @@ export default function UIOrder(props: ChildType) {
|
|
60
60
|
|
61
61
|
//v2
|
62
62
|
|
63
|
-
const renderItem = ({ item, drag, isActive }) => {
|
64
|
-
|
63
|
+
const renderItem = ({ item, drag, isActive, getIndex }) => {
|
64
|
+
const index = getIndex();
|
65
|
+
const name = `${scope.key('row', index, '')}`;
|
66
|
+
const [row] = useState(
|
67
|
+
ScopeUtils.create({
|
68
|
+
...original,
|
69
|
+
parent: scope,
|
70
|
+
name,
|
71
|
+
crud: scope.crud,
|
72
|
+
index,
|
73
|
+
type: 'row',
|
74
|
+
data: item,
|
75
|
+
})
|
76
|
+
);
|
77
|
+
|
78
|
+
let css = { ...scope.getStyle('row') };
|
65
79
|
|
66
80
|
if (isActive) {
|
67
|
-
|
81
|
+
css = { ...css, ...scope.getStyle('active') };
|
68
82
|
}
|
69
83
|
|
84
|
+
if (isActive) {
|
85
|
+
css = { ...css, ...row.getStyle('rowSelected', {}) };
|
86
|
+
} else {
|
87
|
+
css = { ...css, ...row.getStyle('rowUnSelected', {}) };
|
88
|
+
}
|
70
89
|
return (
|
71
90
|
<ScaleDecorator>
|
72
91
|
<TouchableOpacity
|
73
92
|
style={[
|
74
93
|
styles.row,
|
75
94
|
{ backgroundColor: isActive ? 'lightblue' : 'white' },
|
76
|
-
{ ...
|
95
|
+
{ ...css },
|
77
96
|
]}
|
78
97
|
delayLongPress={100}
|
79
98
|
onLongPress={drag} // Initiate drag on long press
|
@@ -103,7 +122,7 @@ export default function UIOrder(props: ChildType) {
|
|
103
122
|
};
|
104
123
|
|
105
124
|
const Header = ({ pos }) => {
|
106
|
-
const hPos = Utils.nvl(original.headerPos, '
|
125
|
+
const hPos = Utils.nvl(original.headerPos, 'outer');
|
107
126
|
|
108
127
|
if (hPos !== pos) return <></>;
|
109
128
|
|