From f06c9250224e414aa58a1ed7fb5aefa2c5213d5c Mon Sep 17 00:00:00 2001 From: balajis-qb Date: Tue, 14 Oct 2025 17:20:10 +0530 Subject: [PATCH] =?UTF-8?q?refactor:=20=E2=99=BB=EF=B8=8F=20Remove=20debou?= =?UTF-8?q?nce=20from=20React-Live=20onChange=20handler?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Resolved the cursor position reset issue while typing in progress --- docs-site/src/components/Example/index.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs-site/src/components/Example/index.tsx b/docs-site/src/components/Example/index.tsx index 06a5e9715..2b73efda0 100644 --- a/docs-site/src/components/Example/index.tsx +++ b/docs-site/src/components/Example/index.tsx @@ -11,7 +11,6 @@ import { fi } from "date-fns/locale/fi"; import { ptBR } from "date-fns/locale/pt-BR"; import { enGB } from "date-fns/locale/en-GB"; import copy from "copy-to-clipboard"; -import { debounce } from "lodash"; import slugify from "slugify"; import range from "lodash/range"; import { themes } from "prism-react-renderer"; @@ -94,7 +93,7 @@ export default class CodeExampleComponent extends React.Component< } }; - handleCodeChange = debounce((code: string) => { + handleCodeChange = (code: string) => { const { activeTab } = this.state; const codeProp = activeTab === "ts" ? "tsxCode" : "jsxCode"; @@ -102,7 +101,7 @@ export default class CodeExampleComponent extends React.Component< ...state, [codeProp]: code, })); - }, 500); + }; handleTabChange = async (tab: TState["activeTab"]) => { const { tsxCode } = this.state;