Skip to content

Commit

Permalink
[core] feat(NumericInput): asyncControl prop (#4411)
Browse files Browse the repository at this point in the history
  • Loading branch information
adidahiya authored Nov 11, 2020
1 parent 5d974da commit 93abded
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/core/src/components/forms/numericInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@ export interface INumericInputProps extends IIntentProps, IProps {
*/
allowNumericCharactersOnly?: boolean;

/**
* Set this to `true` if you will be controlling the `value` of this input with asynchronous updates.
* These may occur if you do not immediately call setState in a parent component with the value from
* the `onChange` handler.
*/
asyncControl?: boolean;

/**
* The position of the buttons with respect to the input field.
* @default Position.RIGHT
Expand Down Expand Up @@ -378,6 +385,7 @@ export class NumericInput extends AbstractPureComponent2<HTMLInputProps & INumer
const inputGroupHtmlProps = removeNonHTMLProps(this.props, NON_HTML_PROPS, true);
return (
<InputGroup
asyncControl={this.props.asyncControl}
autoComplete="off"
{...inputGroupHtmlProps}
intent={this.state.currentImeInputInvalid ? Intent.DANGER : this.props.intent}
Expand Down

1 comment on commit 93abded

@blueprint-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[core] feat(NumericInput): asyncControl prop (#4411)

Previews: documentation | landing | table

Please sign in to comment.