Add row button operational
This commit is contained in:
@@ -251,6 +251,20 @@ function addRow(key, value){
|
||||
headerMap.html(headersMapHtml);
|
||||
}
|
||||
|
||||
const newRowInput = function(){
|
||||
const hName = $('#headerKeyInput').val();
|
||||
const hValue = $('#headerValueInput').val();
|
||||
if(checkIfInputValid(hName) && checkIfInputValid(hValue)){
|
||||
addRow(hName, hValue);
|
||||
}
|
||||
}
|
||||
|
||||
$('#btn-newRow').click(newRowInput);
|
||||
|
||||
function checkIfInputValid(input){
|
||||
return !(input == '' || input == null || input == undefined);
|
||||
}
|
||||
|
||||
function buildRowHtml(key, value){
|
||||
return '' +
|
||||
'<tr>' +
|
||||
|
||||
Reference in New Issue
Block a user