* zin: modify setLineIndex function of thinktableinput.

This commit is contained in:
Zhangyu
2024-05-21 09:28:41 +00:00
parent b26cb1215a
commit 28d0071d47
+4 -3
View File
@@ -20,11 +20,12 @@ window.changeInput = function(e)
*/
function setLineIndex()
{
let index = 0;
let index = 1;
$('.rows-group').each(function()
{
$(this).find('[name^="fileds"]').attr('name', 'fileds[' + index + ']');
$(this).find('[name^="result"]').attr('name', 'result[' + index + ']');
const resultIndex = fieldsCount + index - 1;
$(this).find('[id^="customFields"]').attr('name', 'customFields[' + index + ']');
$(this).find('[id^="result"]').attr('name', 'result[' + resultIndex + ']');
index ++;
});
$('.add-rows').toggleClass('disabled', index >= canAddRows);