浏览代码

Aligned TableUI to the new ListItemView architecture.

Aleksander Nowodzinski 7 年之前
父节点
当前提交
6442e988dc
共有 1 个文件被更改,包括 6 次插入5 次删除
  1. 6 5
      packages/ckeditor5-table/src/tableui.js

+ 6 - 5
packages/ckeditor5-table/src/tableui.js

@@ -171,20 +171,21 @@ function addListOption( option, editor, commands, dropdownItems ) {
 			isSeparator: true
 			isSeparator: true
 		} );
 		} );
 	} else {
 	} else {
-		const { commandName, label, bindIsActive } = option;
+		const { commandName, label, bindIsOn } = option;
 		const command = editor.commands.get( commandName );
 		const command = editor.commands.get( commandName );
 
 
 		commands.push( command );
 		commands.push( command );
 
 
 		itemModel.set( {
 		itemModel.set( {
 			commandName,
 			commandName,
-			label
+			label,
+			withText: true
 		} );
 		} );
 
 
 		itemModel.bind( 'isEnabled' ).to( command );
 		itemModel.bind( 'isEnabled' ).to( command );
 
 
-		if ( bindIsActive ) {
-			itemModel.bind( 'isActive' ).to( command, 'value' );
+		if ( bindIsOn ) {
+			itemModel.bind( 'isOn' ).to( command, 'value' );
 		}
 		}
 	}
 	}
 
 
@@ -198,5 +199,5 @@ function addListOption( option, editor, commands, dropdownItems ) {
  * @private
  * @private
  * @property {String} commandName A command name to execute for that option.
  * @property {String} commandName A command name to execute for that option.
  * @property {String} label A dropdown item label.
  * @property {String} label A dropdown item label.
- * @property {Boolean} bindIsActive If `true`, it will bind the command's value to the `isActive` dropdown item property.
+ * @property {Boolean} bindIsOn If `true`, it will bind the command's value to the `isOn` dropdown item property.
  */
  */