Currently, when an input is removed using removeUI(), its UI is deleted from the DOM but the input still lives from the server's perspective. It would be great if it was possible to clear that input completely.
Personal opinion: I would want this to be the default behaviour, because an input that does not exist on the page should not exist in the server - it's a bit of a logical discrepancy - but that breaking change might cause a lot of trouble so perhaps adding a parameter to removeUI() to do this would be helpful.
The text was updated successfully, but these errors were encountered:
Just dropping a thought here. If you're managing the lifecycle of modules using objects from a bespoke class system, for example, R6, you can register your takedown code as the finalizer function of the module object. The finalizer function will run as the object is garbage collected.