File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ return function(name, basalt)
9393 return
9494 end
9595 for i , v in ipairs (children ) do
96- if v .element == element then
96+ if v .element : getName () == element : getName () then
9797 table.remove (children , i )
9898 return true
9999 end
Original file line number Diff line number Diff line change @@ -408,6 +408,25 @@ return function(name, basalt)
408408 end
409409 end ,
410410
411+ removeChild = function (self , child )
412+ if (type (child )== " string" ) then
413+ child = getChild (element :getName ())
414+ end
415+ if (child == nil ) then
416+ return
417+ end
418+ base .removeChild (self , child )
419+ for k , v in pairs (children ) do
420+ if v :getName () == child :getName () then
421+ table.remove (children , k )
422+ break
423+ end
424+ end
425+ updateLayout = true
426+ self :updateDraw ()
427+ return self
428+ end ,
429+
411430 draw = function (self )
412431 base .draw (self )
413432 self :addDraw (" flexboxDraw" , function ()
You can’t perform that action at this time.
0 commit comments