File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -4682,6 +4682,7 @@ def __getitem__(self, prop):
46824682 CompoundArrayValidator ,
46834683 BaseDataValidator ,
46844684 )
4685+ from .validators .layout ._shapes import ShapesValidator
46854686
46864687 # Normalize prop
46874688 # --------------
@@ -4707,7 +4708,6 @@ def __getitem__(self, prop):
47074708 )
47084709
47094710 validator = self ._get_validator (prop )
4710-
47114711 if isinstance (validator , CompoundValidator ):
47124712 if self ._compound_props .get (prop , None ) is None :
47134713 # Init compound objects
@@ -4719,6 +4719,12 @@ def __getitem__(self, prop):
47194719 self ._compound_props [prop ]._plotly_name = prop
47204720
47214721 return validator .present (self ._compound_props [prop ])
4722+ elif isinstance (validator , ShapesValidator ):
4723+ props = []
4724+ if self ._props is not None and prop in self ._props :
4725+ props = [validator .data_class () for _ in self ._props .get (prop , [])]
4726+
4727+ return validator .present (props )
47224728 elif isinstance (validator , (CompoundArrayValidator , BaseDataValidator )):
47234729 if self ._compound_array_props .get (prop , None ) is None :
47244730 # Init list of compound objects
You can’t perform that action at this time.
0 commit comments