From 1a3aa7448ee7ce7d4987d76e1a658a796ccf23da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomek=20Wytr=C4=99bowicz?= Date: Wed, 6 May 2020 15:24:16 +0200 Subject: [PATCH] Document the return value for InputTextView._createInputTextView. Rename to to reduce the confusion with an event or native element. --- .../ckeditor5-table/src/ui/colorinputview.js | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/packages/ckeditor5-table/src/ui/colorinputview.js b/packages/ckeditor5-table/src/ui/colorinputview.js index 48164ac6524..575ffc64ac2 100644 --- a/packages/ckeditor5-table/src/ui/colorinputview.js +++ b/packages/ckeditor5-table/src/ui/colorinputview.js @@ -186,25 +186,26 @@ export default class ColorInputView extends View { } /** - * Creates and configures the {@link #_inputView}. + * Creates and configures an instance of {@link module:ui/inputtext/inputtextview~InputTextView}. * * @private + * @returns {module:ui/inputtext/inputtextview~InputTextView} A configured instance to be set as {@link #_inputView}. */ _createInputTextView() { const locale = this.locale; - const input = new InputTextView( locale ); + const inputView = new InputTextView( locale ); - input.bind( 'value' ).to( this ); - input.bind( 'isReadOnly' ).to( this ); - input.bind( 'hasError' ).to( this ); + inputView.bind( 'value' ).to( this ); + inputView.bind( 'isReadOnly' ).to( this ); + inputView.bind( 'hasError' ).to( this ); - input.on( 'input', () => { - this.value = input.element.value; + inputView.on( 'input', () => { + this.value = inputView.element.value; } ); - input.delegate( 'input' ).to( this ); + inputView.delegate( 'input' ).to( this ); - return input; + return inputView; } /**