react-native-input-spinner icon indicating copy to clipboard operation
react-native-input-spinner copied to clipboard

Restore erased value if the user does not enter a new one after erasing current value with keyboard

Open taeh98 opened this issue 4 years ago • 2 comments

If the user uses their keyboard to erase the current value of a spinner but then does not type in a new value before closing the keyboard, the original value that was erased should be restored. Please could you implement this?

taeh98 avatar Jan 21 '21 12:01 taeh98

Hi, this could be ambiguous because it is difficult to detect whether the user wants to delete the value or not.

marcocesarato avatar Feb 13 '21 11:02 marcocesarato

Hi, this could be ambiguous because it is difficult to detect whether the user wants to delete the value or not.

That's true, perhaps it could be an optional prop? If you know the use case - the variable being recorded and the wider context of how, when, why, etc your app would be used - perhaps you would know whether or not it would make the most sense to restore a previous value if the user erases an old one without putting in a new one afterwards. If it isn't provided, maybe it could default to not restoring erased values?

taeh98 avatar Feb 13 '21 13:02 taeh98