File tree Expand file tree Collapse file tree 1 file changed +2
-28
lines changed Expand file tree Collapse file tree 1 file changed +2
-28
lines changed Original file line number Diff line number Diff line change @@ -707,36 +707,10 @@ def layout(self, value):
707
707
and not self .validation_layout
708
708
and not self .config .suppress_callback_exceptions
709
709
):
710
-
711
- def simple_clone (c , children = None ):
712
- cls = type (c )
713
- # in Py3 we can use the __init__ signature to reduce to just
714
- # required args and id; in Py2 this doesn't work so we just
715
- # empty out children.
716
- sig = getattr (cls .__init__ , "__signature__" , None )
717
- props = {
718
- p : getattr (c , p )
719
- for p in c ._prop_names # pylint: disable=protected-access
720
- if hasattr (c , p )
721
- and (
722
- p == "id" or not sig or sig .parameters [p ].default == c .REQUIRED
723
- )
724
- }
725
- if props .get ("children" , children ):
726
- props ["children" ] = children or []
727
- return cls (** props )
728
-
710
+
729
711
layout_value = self ._layout_value ()
730
-
731
- if isinstance (layout_value , (list , tuple )):
732
- layout_value = html .Div (children = layout_value )
733
-
734
712
_validate .validate_layout (value , layout_value )
735
- self .validation_layout = simple_clone (
736
- # pylint: disable=protected-access
737
- layout_value ,
738
- [simple_clone (c ) for c in layout_value ._traverse_ids ()],
739
- )
713
+ self .validation_layout = layout_value
740
714
741
715
@property
742
716
def index_string (self ):
You can’t perform that action at this time.
0 commit comments