input-number icon indicating copy to clipboard operation
input-number copied to clipboard

Pass onChange Native Event Back

Open nikkomiu opened this issue 7 years ago • 2 comments

Instead of passing back just the number with the onChange event it would be a more consistent experience to get back the actual event from the input back to the consumer of this component.

Doing so will make it easier and more consistent to process events that come back from other input type elements.

nikkomiu avatar Aug 01 '18 14:08 nikkomiu

I requested that earlier too, declined. You will just have to create a custom component over rc-input-number and have your own onchange handler.

onChange(val) {
    const evt = {
      target: {
        name: this.props.name,
        value: val
      }
    };
    this.props.onChange(evt); // any way you want to raise the standard event
  }

Samnan avatar Aug 27 '18 05:08 Samnan

me need this too

bpgusar1 avatar Jan 28 '19 15:01 bpgusar1