mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-27 02:58:34 +02:00
Prevent sidebar re-render on every keypress (#152)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { useCallback, useMemo } from 'react';
|
||||
import { generateId } from '../../lib/generateId';
|
||||
import { Editor } from './Editor/Editor';
|
||||
import type { PairEditorProps } from './PairEditor';
|
||||
|
||||
@@ -51,6 +52,7 @@ function lineToPair(line: string): PairEditorProps['pairs'][0] {
|
||||
enabled: true,
|
||||
name: (name ?? '').trim(),
|
||||
value: (value ?? '').trim(),
|
||||
id: generateId(),
|
||||
};
|
||||
return pair;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user