playbook_ui 14.9.0.pre.rc.10 → 14.9.0.pre.rc.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e75cb19f382af8d53b3c588b3ef84978512fab3c3369fcc7d0a971a64a962298
4
- data.tar.gz: 8d8df7a92ad1ec2b01d4c67e898ce471cc67d5c865a426fc08aecec431451687
3
+ metadata.gz: 10d1aff51c7bc5cac32a489b1ac8a458fd83e56219c3067c29b0b39717ec9487
4
+ data.tar.gz: 506f14423c81bf727d25c8e844cf43781653159ab2664a52943a2ff9dff526d5
5
5
  SHA512:
6
- metadata.gz: bf02d8ed242ee067842ef2b20bf606a4891978203e73a4e411f175b9154e7f6c833d513aee0b84ce04a39003482690f73b7952bdeecbf9da4e7311828ac0c270
7
- data.tar.gz: 51cc4cee3b67a283dd4476b5412a3520660b1fd5fdf54d633c7a6e7cca9b52f94fd82802c193fb3e2ceca1c1788bf35c23c9ae28f07a7c0e85778f2382550d0f
6
+ metadata.gz: 4506507514a95afcf2b22ba01d1721901cc562a3c9bafdf969b46c772cb13ad160bf17ec3df05a01be8b797533b1a05fc91824f699d143819f4f658413b906d4
7
+ data.tar.gz: 8a2b936c5d869b2eb0564c638de43586a45fc91a785896767ebd1e5b4c903ce5dcb3ce46e32ead2e7775885236bd9ef2eb0c3f26e14d14c486d1c97446787609
@@ -18,9 +18,19 @@ export const separateChildComponents = (children: React.ReactChild[] | React.Rea
18
18
  const otherChildren: React.ReactChild[] = [];
19
19
 
20
20
  React.Children.forEach(children, (child) => {
21
- if (child && (child as ReactElement).type === DropdownTrigger) {
21
+ const element = child as ReactElement;
22
+ const childType = element?.type;
23
+ const childDisplayName = (childType as any)?.displayName || (childType as any)?.name;
24
+
25
+ if (
26
+ childType === DropdownTrigger ||
27
+ childDisplayName === "DropdownTrigger"
28
+ ) {
22
29
  trigger = child;
23
- } else if (child && (child as ReactElement).type === DropdownContainer) {
30
+ } else if (
31
+ childType === DropdownContainer ||
32
+ childDisplayName === "DropdownContainer"
33
+ ) {
24
34
  container = child;
25
35
  } else {
26
36
  otherChildren.push(child);
@@ -30,6 +40,7 @@ export const separateChildComponents = (children: React.ReactChild[] | React.Rea
30
40
  return { trigger, container, otherChildren };
31
41
  };
32
42
 
43
+
33
44
  export const prepareSubcomponents = ({
34
45
  children,
35
46
  hasTriggerSubcomponent,