react api call on input change