playbook_ui 14.16.0.pre.alpha.PLAY1929bracketlayout6930 → 14.16.0.pre.alpha.PLAY1929bracketlayout6957
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.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_layout/_layout.tsx +5 -1
- data/app/pb_kits/playbook/pb_layout/subcomponents/_round.tsx +1 -1
- data/dist/chunks/{_weekday_stacked-DEK84Xao.js → _weekday_stacked-C9nJ2j2C.js} +1 -1
- data/dist/chunks/vendor.js +1 -1
- data/dist/playbook-doc.js +1 -1
- data/lib/playbook/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7b2af193a12246de5703b901c49abeac27c44fa9d2c8f76f5bafc6fccc4f8858
|
4
|
+
data.tar.gz: b8913aebce80550bed950ff30380139f02e336c19fc83cbab919ee146e06df42
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99dcf0a34d39614db573f5166bf05c64bc7036e9681aa84f81dd634cbb330fcbe6b78b1d68765a0d0bfca0f62af8b1607f8655e2e41da5ab4f798959ec0fec4b
|
7
|
+
data.tar.gz: 298f4b8f42a9544aba7aafc308f0abb183a1e6297ee1ad6510ac0035dae60b44b0e6b05aaac676a15e7bd2313f5365b7566550e27f84d2418b2e3438893001eb
|
@@ -176,7 +176,11 @@ const Layout = (props: LayoutPropTypes) => {
|
|
176
176
|
(child: React.ReactElement & {type: {displayName: string}}) => child.type?.displayName !== 'Side'
|
177
177
|
)
|
178
178
|
|
179
|
-
const numberOfRounds = Array.isArray(nonSideChildren) ?
|
179
|
+
const numberOfRounds = Array.isArray(nonSideChildren) ? React.Children.toArray(children).filter(
|
180
|
+
(child) => {
|
181
|
+
return (child as React.ReactElement).type === Layout.Round;
|
182
|
+
}
|
183
|
+
).length : 0
|
180
184
|
const bracketChildren = nonSideChildren.map(child =>
|
181
185
|
React.isValidElement(child) ? React.cloneElement(child, { numberOfRounds }) : child
|
182
186
|
)
|
@@ -33,7 +33,7 @@ export const Round = (props: LayoutRoundProps) => {
|
|
33
33
|
const numberOfChildren = Array.isArray(children) ? children.length : 0
|
34
34
|
|
35
35
|
const childrenWithProps = Array.isArray(children) ? children.map((child, index) =>
|
36
|
-
React.isValidElement(child) ? React.cloneElement(child, { numberOfRounds, numberOfGames: numberOfChildren, isOdd: index % 2 === 0 }) : child
|
36
|
+
React.isValidElement(child) ? React.cloneElement(child, { numberOfRounds, numberOfGames: numberOfChildren, isOdd: index % 2 === 0, key: `child_${index}` }) : child
|
37
37
|
) : children
|
38
38
|
|
39
39
|
const rightConnectors = Array.from({ length: numberOfChildren / 2 }, (_, index) => (
|