superset-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ccwilli...@apache.org
Subject [incubator-superset] branch master updated: remove reactable from Hotkeys.jsx (#6143)
Date Fri, 19 Oct 2018 01:00:09 GMT
This is an automated email from the ASF dual-hosted git repository.

ccwilliams pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 04e5e87  remove reactable from Hotkeys.jsx (#6143)
04e5e87 is described below

commit 04e5e871140021c11565a9ee17563640914efb53
Author: Krist Wongsuphasawat <krist.wongz@gmail.com>
AuthorDate: Thu Oct 18 18:00:03 2018 -0700

    remove reactable from Hotkeys.jsx (#6143)
---
 superset/assets/src/components/Hotkeys.jsx | 31 +++++++++++++++++++-----------
 1 file changed, 20 insertions(+), 11 deletions(-)

diff --git a/superset/assets/src/components/Hotkeys.jsx b/superset/assets/src/components/Hotkeys.jsx
index f6ea114..fbecee8 100644
--- a/superset/assets/src/components/Hotkeys.jsx
+++ b/superset/assets/src/components/Hotkeys.jsx
@@ -1,9 +1,7 @@
 import React from 'react';
 import PropTypes from 'prop-types';
-import { OverlayTrigger, Popover } from 'react-bootstrap';
-import { Table } from 'reactable';
-
 import Mousetrap from 'mousetrap';
+import { OverlayTrigger, Popover } from 'react-bootstrap';
 
 const propTypes = {
   hotkeys: PropTypes.arrayOf(PropTypes.shape({
@@ -25,15 +23,26 @@ export default class Hotkeys extends React.PureComponent {
     });
   }
   renderPopover() {
+    const { header, hotkeys } = this.props;
+
     return (
-      <Popover id="popover-hotkeys" title={this.props.header} style={{ width: '300px'
}}>
-        <Table
-          className="table table-condensed"
-          data={this.props.hotkeys.map(keyConfig => ({
-            Key: keyConfig.key,
-            Action: keyConfig.descr,
-          }))}
-        />
+      <Popover title={header} style={{ width: '300px' }}>
+        <table className="table table-condensed">
+          <thead>
+            <tr>
+              <th>Key</th>
+              <th>Action</th>
+            </tr>
+          </thead>
+          <tbody>
+            {hotkeys.map(({ key, descr }) => (
+              <tr>
+                <td><code>{key}</code></td>
+                <td>{descr}</td>
+              </tr>
+            ))}
+          </tbody>
+        </table>
       </Popover>);
   }
   render() {


Mime
View raw message