Przeglądaj źródła

Cdb-types: save cdb type if parent table is closed

lviguier 1 rok temu
rodzic
commit
a8538b52c5
1 zmienionych plików z 5 dodań i 0 usunięć
  1. 5 0
      hide/comp/cdb/Table.hx

+ 5 - 0
hide/comp/cdb/Table.hx

@@ -74,6 +74,11 @@ class Table extends Component {
 	}
 
 	public function close() {
+		// Close eventual cdb type edition before closing table
+		var children = element.children().find(".cdb-type-string");
+		if (children.length > 0)
+			children.first().trigger("click");
+
 		for( t in @:privateAccess editor.tables.copy() )
 			if( t.parent == this )
 				t.close();