mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
feat(editor): Support pasting an expression into a number parameter (#15722)
This commit is contained in:
@@ -786,6 +786,16 @@ function onPaste(event: ClipboardEvent) {
|
||||
}
|
||||
}
|
||||
|
||||
function onPasteNumber(event: ClipboardEvent) {
|
||||
const pastedText = event.clipboardData?.getData('text');
|
||||
|
||||
if (shouldConvertToExpression(pastedText)) {
|
||||
event.preventDefault();
|
||||
valueChanged('=' + pastedText);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
function onResourceLocatorDrop(data: string) {
|
||||
emit('drop', data);
|
||||
}
|
||||
@@ -1596,7 +1606,7 @@ onUpdated(async () => {
|
||||
@update:model-value="onUpdateTextInput"
|
||||
@focus="setFocus"
|
||||
@blur="onBlur"
|
||||
@keydown.stop
|
||||
@paste="onPasteNumber"
|
||||
/>
|
||||
|
||||
<CredentialsSelect
|
||||
|
||||
Reference in New Issue
Block a user