Skip to content

Commit

Permalink
remove isButtonGroupFocused state
Browse files Browse the repository at this point in the history
set but never read
  • Loading branch information
Gilad Gray committed Dec 1, 2018
1 parent b99b717 commit 283a380
Showing 1 changed file with 2 additions and 25 deletions.
27 changes: 2 additions & 25 deletions packages/core/src/components/forms/numericInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ export interface INumericInputProps extends IIntentProps, IProps {

export interface INumericInputState {
isInputGroupFocused?: boolean;
isButtonGroupFocused?: boolean;
shouldSelectAfterUpdate?: boolean;
stepMaxPrecision?: number;
value?: string;
Expand Down Expand Up @@ -290,22 +289,8 @@ export class NumericInput extends AbstractPureComponent<HTMLInputProps & INumeri
const disabled = this.props.disabled || this.props.readOnly;
return (
<ButtonGroup className={Classes.FIXED} key="button-group" vertical={true}>
<Button
disabled={disabled}
icon="chevron-up"
intent={intent}
onBlur={this.handleButtonBlur}
onFocus={this.handleButtonFocus}
{...this.incrementButtonHandlers}
/>
<Button
disabled={disabled}
icon="chevron-down"
intent={intent}
onBlur={this.handleButtonBlur}
onFocus={this.handleButtonFocus}
{...this.decrementButtonHandlers}
/>
<Button disabled={disabled} icon="chevron-up" intent={intent} {...this.incrementButtonHandlers} />
<Button disabled={disabled} icon="chevron-down" intent={intent} {...this.decrementButtonHandlers} />
</ButtonGroup>
);
}
Expand Down Expand Up @@ -360,14 +345,6 @@ export class NumericInput extends AbstractPureComponent<HTMLInputProps & INumeri
this.invokeValueCallback(nextValue, this.props.onButtonClick);
};

private handleButtonFocus = () => {
this.setState({ isButtonGroupFocused: true });
};

private handleButtonBlur = () => {
this.setState({ isButtonGroupFocused: false });
};

private startContinuousChange() {
// The button's onMouseUp event handler doesn't fire if the user
// releases outside of the button, so we need to watch all the way
Expand Down

0 comments on commit 283a380

Please sign in to comment.