The handleInputChange function takes a String parameter newValue, which represents the new value of the input field.
Within handleInputChange, a message is printed to the console indicating that the value has changed, and then the newUserTicketAmount state is updated with the new value.
The BSInput component is a custom input component that allows users to input text.
It has several attributes:
value: This is set to newUserTicketAmount, which represents the current value of the input field which I get from the user state.
onValueChange: This callback scould be triggered when the input value changes. It calls the handleInputChange function with the new value.
required: This attribute indicates whether the input field is required.
floating: This attribute determines whether the input label should float above the input field when there is text in the field.
type: This specifies the type of input, in this case, it's set to InputType.Text.
modifier: This applies styling to the input field, such as setting its width and border.
onEnterClick: This callback is triggered when the Enter key is pressed while the input field is focused. It launches a coroutine scope to execute some asynchronous code.
Potential Issue:
The BSInput component seems to be correctly configured to update the newUserTicketAmount state via the onValueChange callback.
However, I am not seeing anything printed to the console when changing the value and I am unable to change the value/
Code Explanation:
The handleInputChange function takes a String parameter newValue, which represents the new value of the input field.
Within handleInputChange, a message is printed to the console indicating that the value has changed, and then the newUserTicketAmount state is updated with the new value.
The BSInput component is a custom input component that allows users to input text. It has several attributes: value: This is set to newUserTicketAmount, which represents the current value of the input field which I get from the user state.
onValueChange: This callback scould be triggered when the input value changes. It calls the handleInputChange function with the new value.
required: This attribute indicates whether the input field is required.
floating: This attribute determines whether the input label should float above the input field when there is text in the field.
type: This specifies the type of input, in this case, it's set to InputType.Text.
modifier: This applies styling to the input field, such as setting its width and border.
onEnterClick: This callback is triggered when the Enter key is pressed while the input field is focused. It launches a coroutine scope to execute some asynchronous code.
Potential Issue:
The BSInput component seems to be correctly configured to update the newUserTicketAmount state via the onValueChange callback.
However, I am not seeing anything printed to the console when changing the value and I am unable to change the value/
But if I comment out the onEnterClick attribute as following it works: