Skip to content

Commit c914376

Browse files
luis-dkaarthy-dk
authored andcommitted
fix(connections): stop connection form from re-rendering needlessly
1 parent 8a41d6c commit c914376

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

testgen/ui/components/frontend/js/components/connection_form.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,14 +119,14 @@ const ConnectionForm = (props, saveButton) => {
119119
privateKeyPhrase.val = '';
120120
}
121121

122-
const flavor = getValue(props.flavors).find(f => f.value === connectionFlavor.val);
122+
const flavor = getValue(props.flavors).find(f => f.value === connectionFlavor.rawVal);
123123
const originalURLTemplate = van.state(flavor.connection_string);
124-
const [prefixPart, sufixPart] = originalURLTemplate.val.split('@');
124+
const [prefixPart, sufixPart] = originalURLTemplate.rawVal.split('@');
125125

126126
const connectionStringPrefix = van.state(prefixPart);
127127
const connectionStringSuffix = van.state(connection?.url ?? '');
128-
if (!connectionStringSuffix.val) {
129-
connectionStringSuffix.val = formatURL(sufixPart ?? '', connectionHost.val, connectionPort.val, connectionDatabase.val);
128+
if (!connectionStringSuffix.rawVal) {
129+
connectionStringSuffix.val = formatURL(sufixPart ?? '', connectionHost.rawVal, connectionPort.rawVal, connectionDatabase.rawVal);
130130
}
131131

132132
const updatedConnection = van.derive(() => {

0 commit comments

Comments
 (0)