Fix component add/change and delete dialogs

Any reason `editing` needs to be a function?