瀏覽代碼

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

lviguier 1 年之前
父節點
當前提交
a8538b52c5
共有 1 個文件被更改,包括 5 次插入0 次删除
  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();