From c355fed74b2401b2cb1438d3a1c6b34143b292d2 Mon Sep 17 00:00:00 2001 From: Nathan Reese Date: Mon, 16 Apr 2018 19:49:39 -0600 Subject: [PATCH] fix spacing in example text, fix lodash import --- src-docs/src/views/combo_box/combo_box_example.js | 8 ++++---- src/components/combo_box/combo_box.js | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src-docs/src/views/combo_box/combo_box_example.js b/src-docs/src/views/combo_box/combo_box_example.js index 2fcce4ad73c..e3d69e48c60 100644 --- a/src-docs/src/views/combo_box/combo_box_example.js +++ b/src-docs/src/views/combo_box/combo_box_example.js @@ -109,8 +109,8 @@ export const ComboBoxExample = { }], text: (

- EuiComboBoxList uses react-virtualized - to only render visiable options to be super fast no matter how many options there are. + EuiComboBoxList uses react-virtualized{' '} + to only render visible options to be super fast no matter how many options there are.

), props: { EuiComboBox }, @@ -163,8 +163,8 @@ export const ComboBoxExample = { text: (

- You can provide a renderOption prop which will accept option - and searchValue arguments. Use the value prop of the + You can provide a renderOption prop which will accept option{' '} + and searchValue arguments. Use the value prop of the{' '} option object to store metadata about the option for use in this callback.

diff --git a/src/components/combo_box/combo_box.js b/src/components/combo_box/combo_box.js index afc3f8d05c3..d2ee1b3ded5 100644 --- a/src/components/combo_box/combo_box.js +++ b/src/components/combo_box/combo_box.js @@ -3,7 +3,7 @@ * from the tab order with tabindex="-1" so that we can control the keyboard navigation interface. */ -import _ from 'lodash'; +import { throttle } from 'lodash'; import React, { Component, } from 'react'; @@ -151,7 +151,7 @@ export class EuiComboBox extends Component { tabbableItems[comboBoxIndex + amount].focus(); }; - incrementActiveOptionIndex = _.throttle(amount => { + incrementActiveOptionIndex = throttle(amount => { // If there are no options available, reset the focus. if (!this.matchingOptions.length) { this.clearActiveOption();