Skip to content

Commit

Permalink
Disable auto focus when creating a new viz, fix elastic#12888
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Roes committed Aug 25, 2017
1 parent 013b3d1 commit a20f5b0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ <h2 class="kuiTitle kuiVerticalRhythm">
type="searches"
class="wizard-row visualizeWizardSavedObjectFinder kuiVerticalRhythm"
make-url="step2WithSearchUrl"
disable-auto-focus="false"
></saved-object-finder>
</div>
</div>
Expand Down
7 changes: 6 additions & 1 deletion src/ui/public/directives/saved_object_finder.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,12 @@ module.directive('savedObjectFinder', function ($location, $injector, kbnUrl, Pr
* @type {function} - an optional function. If supplied an `Add new X` button is shown
* and this function is called when clicked.
*/
onAddNew: '='
onAddNew: '=',
/**
* @{type} boolean - set this to true, if you don't want the search box above the
* table to automatically gain focus once loaded
*/
disableAutoFocus: '='
},
template: savedObjectFinderTemplate,
controllerAs: 'finder',
Expand Down
1 change: 1 addition & 0 deletions src/ui/public/partials/saved_object_finder.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<input
class="kuiSearchInput__input"
input-focus
disable-input-focus="disableAutoFocus"
ng-model="filter"
ng-attr-placeholder="{{ finder.properties.nouns | label }} Filter..."
ng-keydown="finder.filterKeyDown($event)"
Expand Down

0 comments on commit a20f5b0

Please sign in to comment.