@towsila/expo-ui-library 1.5.7 → 1.5.9
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
|
@@ -21,23 +21,32 @@ interface Props {
|
|
|
21
21
|
function splitIntoSteps(fields: Field[]): Field[][] {
|
|
22
22
|
const info = fields.filter((f) => f.type !== "password");
|
|
23
23
|
const security = fields.filter((f) => f.type === "password");
|
|
24
|
+
|
|
25
|
+
console.log("DEBUG splitIntoSteps:", {
|
|
26
|
+
totalFields: fields.length,
|
|
27
|
+
infoFields: info.length,
|
|
28
|
+
securityFields: security.length,
|
|
29
|
+
});
|
|
24
30
|
|
|
25
31
|
const steps: Field[][] = [];
|
|
26
32
|
|
|
27
33
|
// Split info fields if more than 3
|
|
28
|
-
if (info.length >
|
|
34
|
+
if (info.length > 4) {
|
|
35
|
+
console.log("SPLITTING INFO FIELDS");
|
|
29
36
|
const mid = Math.ceil(info.length / 2);
|
|
30
37
|
steps.push(info.slice(0, mid));
|
|
31
38
|
steps.push(info.slice(mid));
|
|
32
39
|
} else if (info.length > 0) {
|
|
40
|
+
console.log("NOT SPLITTING, ADDING ALL");
|
|
33
41
|
steps.push(info);
|
|
34
42
|
}
|
|
35
43
|
|
|
36
44
|
// Add security fields as separate step
|
|
37
45
|
if (security.length > 0) {
|
|
46
|
+
console.log("ADDING SECURITY STEP");
|
|
38
47
|
steps.push(security);
|
|
39
48
|
}
|
|
40
|
-
|
|
49
|
+
console.log("FINAL STEPS:", steps.length);
|
|
41
50
|
return steps;
|
|
42
51
|
}
|
|
43
52
|
|