fixed author numbers

This commit is contained in:
kaarleol
2024-11-02 20:26:35 +02:00
parent 8b3fa1f48f
commit d362cd52f0
@@ -85,7 +85,7 @@ export const AuthorTab: React.FC<AuthorTabProps> = ({ field_num_param, tab_name
{
...newAuthor,
rid: editData.rid,
au_num: editData.ref_authors.length + 1,
au_num: editData.ref_authors.filter(author => author.field_id === field_num_param).length + 1,
field_id: field_num_param,
rowState: 'new' as RowState,
},
@@ -113,7 +113,7 @@ export const AuthorTab: React.FC<AuthorTabProps> = ({ field_num_param, tab_name
{
...newAuthor,
rid: editData.rid,
au_num: editData.ref_authors.length + 1,
au_num: editData.ref_authors.filter(author => author.field_id === field_num_param).length + 1,
field_id: field_num_param,
rowState: 'new' as RowState,
},