You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, as far as the parent component is rendered, the RIEInput component is also rendered so, even if the user was editing the input, the RIEInput assumes that the parent has provided him with a new value and hides the <input> (producing mouse blur and so on).
So finally, I had to write a simple wrapper component which just holds a RIEInput component, and implements shouldComponentUpdate(nextProps, nextState) returning false if the newProps.value === this.props.value.
Of course, this makes imposible for the parent component to change other RIEInput props such as `className, and so on, but it becomes much more easier to use.
So, shouldn't RIEInput internally implement something like this?
The text was updated successfully, but these errors were encountered:
Currently, as far as the parent component is rendered, the
RIEInput
component is also rendered so, even if the user was editing the input, theRIEInput
assumes that the parent has provided him with a newvalue
and hides the<input>
(producing mouse blur and so on).So finally, I had to write a simple wrapper component which just holds a
RIEInput
component, and implementsshouldComponentUpdate(nextProps, nextState)
returningfalse
if thenewProps.value === this.props.value
.Of course, this makes imposible for the parent component to change other
RIEInput
props such as `className, and so on, but it becomes much more easier to use.So, shouldn't
RIEInput
internally implement something like this?The text was updated successfully, but these errors were encountered: