For input components, how do I get access to the actual values input?

Sorry newbie question here - I want to use the syncfusion form components such as TextBoxComponent but I cannot find in the documentation where I can actually get hold of the values input by the user. For react inputs I would normally use something like
<input ... onchange={(e) => handleinput(e)} value="{myValue}"
where
const handleInput = (e) => setMyValue(e.target.value);

but this does not work with <TextBoxComponent /> Any suggestions?

Thanks in advance.



2 Replies 1 reply marked as answer

HJ Hywel Jones September 3, 2023 05:31 PM UTC

OK found the answers by scouring the docs - as I said newbie here. Looks like most SyncFusion input components have a 'change' prop which gets called when the input loses focus and you can access the user input value through event.value. There is also the 'input' prop which gets called on each keystroke, so equivalent to 'onChange' for regular input elements. 

Topic closed


Marked as answer

SS Shereen Shajahan Syncfusion Team September 4, 2023 01:14 PM UTC

Hi Hywel,

Glad to know that your issue has been resolved. Please get back to us for assistance in the future.

Regards,

Shereen


Loader.
Up arrow icon