react-crud-mobile 1.3.380 → 1.3.381
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 +14 -4
- 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 +14 -4
- package/dist/react-crud-mobile.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/elements/core/UIOrder.tsx +14 -1
package/package.json
CHANGED
@@ -199,20 +199,33 @@ export default function UIOrder(props: ChildType) {
|
|
199
199
|
});
|
200
200
|
};
|
201
201
|
|
202
|
+
const Empty = () => {
|
203
|
+
if (Utils.isEmpty(items)) {
|
204
|
+
let empty = scope.part('empty', 'Sem registro');
|
205
|
+
|
206
|
+
if (empty !== false) return <>{empty}</>;
|
207
|
+
}
|
208
|
+
|
209
|
+
return <></>;
|
210
|
+
};
|
211
|
+
|
202
212
|
return (
|
203
213
|
<View style={styles.container}>
|
214
|
+
<Empty />
|
204
215
|
<View style={{ height: items.length * ITEM_HEIGHT, width: '100%' }}>
|
205
216
|
{items.map(item => {
|
206
217
|
const y = positions[item.value];
|
207
218
|
if (!y) return null;
|
208
219
|
|
209
220
|
const isDragging = draggingId === item.value;
|
221
|
+
const itemStyle = scope.getStyle('row', { ...styles.item });
|
222
|
+
|
210
223
|
return (
|
211
224
|
<Animated.View
|
212
225
|
key={item.value}
|
213
226
|
{...(panRespondersRef.current[item.value]?.panHandlers ?? {})}
|
214
227
|
style={[
|
215
|
-
|
228
|
+
itemStyle,
|
216
229
|
{
|
217
230
|
position: 'absolute',
|
218
231
|
left: 0,
|