You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by hu...@apache.org on 2019/01/25 04:14:21 UTC

[incubator-superset] branch omnibar updated: set focus

This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/omnibar by this push:
     new 09185b8  set focus
09185b8 is described below

commit 09185b8ce418e2c46e0dafa7a1d528c4aad5e817
Author: hughhhh <hm...@lyft.com>
AuthorDate: Thu Jan 24 20:14:04 2019 -0800

    set focus
---
 superset/assets/src/dashboard/components/Dashboard.jsx | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/superset/assets/src/dashboard/components/Dashboard.jsx b/superset/assets/src/dashboard/components/Dashboard.jsx
index 6bc403e..ed40c7d 100644
--- a/superset/assets/src/dashboard/components/Dashboard.jsx
+++ b/superset/assets/src/dashboard/components/Dashboard.jsx
@@ -20,6 +20,7 @@ import React from 'react';
 import { Modal } from 'react-bootstrap';
 import PropTypes from 'prop-types';
 import { t } from '@superset-ui/translation';
+import $ from 'jquery'
 
 import getChartIdsFromLayout from '../util/getChartIdsFromLayout';
 import DashboardBuilder from '../containers/DashboardBuilder';
@@ -227,6 +228,7 @@ class Dashboard extends React.PureComponent {
       const isK = event.key === 'k' || event.keyCode === 83;
       if (isK) {
         this.setState({ showOmni: !this.state.showOmni });
+        console.log($('.modal-dialog:first input').focus());
       }
     }
   }