diff --git a/src/main/resources/static/js/datatransfer.js b/src/main/resources/static/js/datatransfer.js index 115f619..e7a0719 100644 --- a/src/main/resources/static/js/datatransfer.js +++ b/src/main/resources/static/js/datatransfer.js @@ -252,10 +252,12 @@ function addRow(key, value){ } const newRowInput = function(){ - const hName = $('#headerKeyInput').val(); - const hValue = $('#headerValueInput').val(); - if(checkIfInputValid(hName) && checkIfInputValid(hValue)){ - addRow(hName, hValue); + const hName = $('#headerKeyInput'); + const hValue = $('#headerValueInput'); + if(checkIfInputValid(hName.val()) && checkIfInputValid(hValue.val())){ + addRow(hName.val(), hValue.val()); + hName.val(null); + hValue.val(null); } } diff --git a/target/classes/static/js/datatransfer.js b/target/classes/static/js/datatransfer.js index 115f619..e7a0719 100644 --- a/target/classes/static/js/datatransfer.js +++ b/target/classes/static/js/datatransfer.js @@ -252,10 +252,12 @@ function addRow(key, value){ } const newRowInput = function(){ - const hName = $('#headerKeyInput').val(); - const hValue = $('#headerValueInput').val(); - if(checkIfInputValid(hName) && checkIfInputValid(hValue)){ - addRow(hName, hValue); + const hName = $('#headerKeyInput'); + const hValue = $('#headerValueInput'); + if(checkIfInputValid(hName.val()) && checkIfInputValid(hValue.val())){ + addRow(hName.val(), hValue.val()); + hName.val(null); + hValue.val(null); } }