I want to use debounce here , to just put few time delay, what is the best way for this,
c
Chris Fillmore
07/03/2022, 11:52 AM
You can emit this value into a Flow and apply debounce to the Flow
👍 1
f
FunkyMuse
07/03/2022, 11:55 AM
What chris said or create something like this
job.cancel()
job = scope.launch {
delay
searchApiWithQueryOrSomrthing
}
a
Arjun Achatz
07/03/2022, 11:21 PM
Someone posted a super clean debounce modifier a few months ago, you'll be able to find it with a Google search
c
Chris Fillmore
07/04/2022, 11:54 AM
Unless I'm mistaken it looks like the question is asking about debouncing value change in a text field, not a clickable, so I don't think a Modifier could be applied here