You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by mi...@apache.org on 2017/01/10 01:50:17 UTC

zeppelin git commit: [ZEPPELIN-1924] Fix "this._isNumeric is not a function" error

Repository: zeppelin
Updated Branches:
  refs/heads/master 41f72723e -> b4590c469


[ZEPPELIN-1924] Fix "this._isNumeric is not a function" error

### What is this PR for?
After #1815 was merged,
```
uncaught TypeError: this._isNumeric is not a function
    at ColumnSettings._numericValidator [as validator] (handsonHelper.js:172)
    at handsontable.js:5181
```
is shown when click "Numeric" in the result table like below.
<img src="https://cloud.githubusercontent.com/assets/10060731/21749365/d1d700ee-d5e0-11e6-9f25-65ebb3ea313a.gif" width="450px">

Since ES6 no longer supports autobind for `this`, seems it needs to be bound in the constructor.

### What type of PR is it?
Bug Fix

### What is the Jira issue?
[ZEPPELIN-1924](https://issues.apache.org/jira/browse/ZEPPELIN-1924)

### How should this be tested?
**To reproduce**
In master, go to Spark tutorial note and click
<img width="230" alt="screen shot 2017-01-08 at 8 32 05 pm" src="https://cloud.githubusercontent.com/assets/10060731/21749412/8a123318-d5e1-11e6-9a65-a84e443c385c.png">
`Numeric`. Then the error msg will be shown in browser dev console.

With this patch, this error msg won't be shown up anymore :)

### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no

Author: AhyoungRyu <fb...@hanmail.net>

Closes #1870 from AhyoungRyu/ZEPPELIN-1924 and squashes the following commits:

7d5bf9e [AhyoungRyu] Bind _numericValidator in the constructor


Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo
Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/b4590c46
Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/b4590c46
Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/b4590c46

Branch: refs/heads/master
Commit: b4590c46955fcaec9ef12b066f2f0021d083f950
Parents: 41f7272
Author: AhyoungRyu <fb...@hanmail.net>
Authored: Sun Jan 8 20:23:34 2017 +0900
Committer: Mina Lee <mi...@apache.org>
Committed: Tue Jan 10 10:50:14 2017 +0900

----------------------------------------------------------------------
 zeppelin-web/src/app/handsontable/handsonHelper.js | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/b4590c46/zeppelin-web/src/app/handsontable/handsonHelper.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/app/handsontable/handsonHelper.js b/zeppelin-web/src/app/handsontable/handsonHelper.js
index bacb298..ccfa87a 100644
--- a/zeppelin-web/src/app/handsontable/handsonHelper.js
+++ b/zeppelin-web/src/app/handsontable/handsonHelper.js
@@ -20,6 +20,7 @@ export default class HandsonHelper {
     this.columns = columns || [];
     this.rows = rows || [];
     this.comment = comment || '';
+    this._numericValidator = this._numericValidator.bind(this);
   };
 
   getHandsonTableConfig(columns, columnNames, resultRows) {