mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-25 10:18:31 +02:00
Apply forceUpdateKey to bulk pair editor
This commit is contained in:
@@ -4,7 +4,13 @@ import type { PairEditorProps } from './PairEditor';
|
|||||||
|
|
||||||
type Props = PairEditorProps;
|
type Props = PairEditorProps;
|
||||||
|
|
||||||
export function BulkPairEditor({ pairs, onChange, namePlaceholder, valuePlaceholder }: Props) {
|
export function BulkPairEditor({
|
||||||
|
pairs,
|
||||||
|
onChange,
|
||||||
|
namePlaceholder,
|
||||||
|
valuePlaceholder,
|
||||||
|
forceUpdateKey,
|
||||||
|
}: Props) {
|
||||||
const pairsText = useMemo(() => {
|
const pairsText = useMemo(() => {
|
||||||
return pairs
|
return pairs
|
||||||
.filter((p) => !(p.name.trim() === '' && p.value.trim() === ''))
|
.filter((p) => !(p.name.trim() === '' && p.value.trim() === ''))
|
||||||
@@ -27,6 +33,7 @@ export function BulkPairEditor({ pairs, onChange, namePlaceholder, valuePlacehol
|
|||||||
<Editor
|
<Editor
|
||||||
useTemplating
|
useTemplating
|
||||||
autocompleteVariables
|
autocompleteVariables
|
||||||
|
forceUpdateKey={forceUpdateKey}
|
||||||
placeholder={`${namePlaceholder ?? 'name'}: ${valuePlaceholder ?? 'value'}`}
|
placeholder={`${namePlaceholder ?? 'name'}: ${valuePlaceholder ?? 'value'}`}
|
||||||
defaultValue={pairsText}
|
defaultValue={pairsText}
|
||||||
contentType="pairs"
|
contentType="pairs"
|
||||||
|
|||||||
Reference in New Issue
Block a user