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
Hi,
I am trying to make an autosuggest component for a quiz activity. One of the requirements is to show when a selected suggestion is the correct answer or not. I want to show this by changing the background-color of the input field.
I want to do this by adding and removing css classes to the input. I understand the default classname is react-autosuggest__input. Is there a way to dynamically add/remove new classes? I want to add a wrong class or a correct class depending on the answer selected.
I am trying to do this via renderInputComponent feature kind of like this (but it does not work):
Hi,
I am trying to make an autosuggest component for a quiz activity. One of the requirements is to show when a selected suggestion is the correct answer or not. I want to show this by changing the
background-color
of the input field.I want to do this by adding and removing css classes to the input. I understand the default classname is
react-autosuggest__input
. Is there a way to dynamically add/remove new classes? I want to add awrong
class or acorrect
class depending on the answer selected.I am trying to do this via
renderInputComponent
feature kind of like this (but it does not work):Any suggestion on how to accomplish this?
The text was updated successfully, but these errors were encountered: