diff --git a/src/ui/elements/forms/InputProps.tsx b/src/ui/elements/forms/InputProps.tsx index 3951d08..bf16441 100644 --- a/src/ui/elements/forms/InputProps.tsx +++ b/src/ui/elements/forms/InputProps.tsx @@ -2,6 +2,7 @@ export type InputProps = { name?: string; value?: string; placeholder?: string; + onInput?: () => void; onChange?: () => void; required?: boolean; checked?: boolean; diff --git a/src/ui/pages/Secrets/KeyValue/KeyValueEdit.tsx b/src/ui/pages/Secrets/KeyValue/KeyValueEdit.tsx index ddd6c12..55f97b1 100644 --- a/src/ui/pages/Secrets/KeyValue/KeyValueEdit.tsx +++ b/src/ui/pages/Secrets/KeyValue/KeyValueEdit.tsx @@ -66,7 +66,7 @@ export class KVEditor extends Component { this.setState({ dataLoaded: true, kvData: kvData, - code: this.getStringKVData(kvData), + code: this.getStringKVData(kvData, this.state.syntax), }); } @@ -95,11 +95,11 @@ export class KVEditor extends Component { } } - getStringKVData(data: Record): string { + getStringKVData(data: Record, syntax: string): string { return dumpData( Object.fromEntries(sortedObjectMap(data)), this.props.settings.kvEditorIndent, - this.state.syntax, + syntax, ); } @@ -115,7 +115,8 @@ export class KVEditor extends Component {