@cubone/react-file-manager 1.27.0 → 1.27.1
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.
|
@@ -2618,10 +2618,10 @@ const To = "مجلد جديد", Ao = "رفع", zo = "لصق", Ro = "تغيير
|
|
|
2618
2618
|
}, Nn = Pe(), sv = ({ children: n, initialPath: e, onFolderChange: t }) => {
|
|
2619
2619
|
const { files: o } = Xe(), s = re(!1), [i, r] = R(""), [l, a] = R(null), [d, u] = R([]), [f, p] = R({ key: "name", direction: "asc" });
|
|
2620
2620
|
return Q(() => {
|
|
2621
|
-
Array.isArray(o) && o.length > 0
|
|
2621
|
+
Array.isArray(o) && o.length > 0 ? (u(() => {
|
|
2622
2622
|
const h = o.filter((m) => m.path === `${i}/${m.name}`);
|
|
2623
2623
|
return ov(h, f.key, f.direction);
|
|
2624
|
-
}), a(() => o.find((h) => h.path === i) ?? null));
|
|
2624
|
+
}), a(() => o.find((h) => h.path === i) ?? null)) : (u([]), a(null));
|
|
2625
2625
|
}, [o, i, f]), Q(() => {
|
|
2626
2626
|
if (!s.current && Array.isArray(o) && o.length > 0) {
|
|
2627
2627
|
const h = o.some((m) => m.isDirectory && m.path === e) ? e : "";
|