Long Text Input As Initial Value Error Upon Change

Hi @Joyce / Everyone else! - Question… I have a “long text” field that “ideally” id want to change the value in supabase upon the changing of that text input.

I also have the “initial” value as that value in Supabase. What I am noticing is that either the input is not getting to Supabase quickly enough to write into that record, to then display it as the initial value, OR Supabase isnt getting it back quickly enough.

Either way, If a user decides to type in that field in a quick manner, it creates a poor typing experiece/effect that makes it look like their typing isnt being registered etc. - se the loom i made for a quick snippet of what I mean - Loom | Free Screen & Video Recording Software | Loom

Anyways, whats the best way to achieve what I want to do here which is allow the user a continuos stream of typing for the input (normal input) and just push to supabase when their is pauses in typing.

Its weird because it seems that some fields do what I want some/most of the time (updates in real time), but there are times where it has that effect and I cant pinpoint it.

Is there a way to add stipulations to the “value changed” trigger to be something like “value changed” after 1 second of no typing (so a “wait” 1 second type situation). Id ideally not want to have have when press enter etc.

Thanks!

Jon

Hey, I don’t think that’s how the Supabase calls are supposed to work. This way you’re sending request what seems like on every keystroke? You can use debounce for this. It’s a property that should be on the text fields. This allows you to set a time after which when user idles, the event is sent.

2 Likes

@Broberto Yes thats perfect and looks like exactly what I was looking for! Seems to be working as I wanted now!