Skip to content

Commit

Permalink
Document the return value for InputTextView._createInputTextView.
Browse files Browse the repository at this point in the history
Rename  to  to reduce the confusion with an  event or native element.
  • Loading branch information
tomalec committed May 6, 2020
1 parent 887c6a5 commit 1a3aa74
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions packages/ckeditor5-table/src/ui/colorinputview.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down

0 comments on commit 1a3aa74

Please sign in to comment.