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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-crud-mobile",
3
- "version": "1.3.380",
3
+ "version": "1.3.381",
4
4
  "license": "MIT",
5
5
  "description": "Uma biblioteca de componentes para React Native v1",
6
6
  "main": "dist/index.js",
@@ -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
- styles.item,
228
+ itemStyle,
216
229
  {
217
230
  position: 'absolute',
218
231
  left: 0,