Skip to content

debounced callback#34

Open
nathantsoi wants to merge 1 commit intoVaguelySerious:mainfrom
Percepti-AI:feature/debouced-callback
Open

debounced callback#34
nathantsoi wants to merge 1 commit intoVaguelySerious:mainfrom
Percepti-AI:feature/debouced-callback

Conversation

@nathantsoi
Copy link

add a callback that debounces for debounceTimeMs

i tested the new callback and debounceTimeMs prop manually

looks like tests arent running for me... lmk if there is anything i need to do to get this pulled in.

also, i have package updates (to quill 2.0.3 from npm) which was required to get my dev setup running b/c the 2.0.2 source was asking for auth to pull the quill package. happy to submit another pr with this update if helpful

@jtomaszewski
Copy link

That seems like something that you should add by yourself to a wrapper on top of react-quill. It shouldn't be added here, to keep this library minimal.

@nathantsoi
Copy link
Author

Yeah, initially tried this, however it doesn't make sense to track the changed delta outside of this component

@jtomaszewski
Copy link

Can you first state your problem/need? You're suggesting here some solution, but to what exactly?

@nathantsoi
Copy link
Author

nathantsoi commented Apr 10, 2025

For sure. Having a callback for each keystroke is not super useful for persistence, etc. What we really want are larger chucks of changes as they occur over time, hence the standard debounced update.

Now, why in the component? 1. I assume other people need this functionality as well and 2. tracking changes outside the component requires wrapping it again.. which is silly.

This PR is a contribution to the community. I don't have time to argue over the merits. If ya'll don't want this, totally fine, I'll just fork. However, my hope is that others can benefit from this small update.

Cheers! - N

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants