@bitrise/bitkit 13.239.0 → 13.241.0
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,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Children } from 'react';
|
|
2
2
|
import {
|
|
3
3
|
Breadcrumb as ChakraBreadcrumb,
|
|
4
4
|
BreadcrumbItem,
|
|
@@ -22,12 +22,9 @@ const Breadcrumb = forwardRef<BreadcrumbProps, 'nav'>((props, ref) => {
|
|
|
22
22
|
const { children, hasSeparatorAfterLast, hasSeparatorBeforeFirst, separatorIconName, ...rest } = props;
|
|
23
23
|
const { isMobile } = useResponsive();
|
|
24
24
|
|
|
25
|
-
const
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
return null;
|
|
29
|
-
}
|
|
30
|
-
|
|
25
|
+
const childArray = Children.toArray(children);
|
|
26
|
+
const childrenCount = childArray.length;
|
|
27
|
+
const items = childArray.map((child, index) => {
|
|
31
28
|
return (
|
|
32
29
|
<BreadcrumbItem>
|
|
33
30
|
{hasSeparatorBeforeFirst && index === 0 && <BreadcrumbSeparator marginLeft="0" />}
|
|
@@ -213,7 +213,7 @@ function useDropdown<T>({
|
|
|
213
213
|
// clear map when value is changed from the outside
|
|
214
214
|
useEffect(() => {
|
|
215
215
|
if (labelMapRef.current && Array.isArray(value)) {
|
|
216
|
-
const removed = labelMapRef.current.keys().filter((key) => !value.includes(key));
|
|
216
|
+
const removed = [...labelMapRef.current.keys()].filter((key) => !value.includes(key));
|
|
217
217
|
removed.forEach((remove) => labelMapRef.current?.delete(remove));
|
|
218
218
|
}
|
|
219
219
|
}, [value]);
|