Skip to content

Fix row creation in empty child table & add min-width to childtable ui#695

Merged
niraj2477 merged 1 commit intodevelopfrom
fix/childtable
Jul 29, 2025
Merged

Fix row creation in empty child table & add min-width to childtable ui#695
niraj2477 merged 1 commit intodevelopfrom
fix/childtable

Conversation

@Siddhantsingh1230
Copy link
Copy Markdown
Collaborator

Description

This PR fixes row creation in the Project Detail page when the child table is initially empty.
The issue was caused by using rows[rows.length - 1].idx + 1, which fails when rows is an empty array, as rows[-1] is undefined. This PR also adds a minimum width to the child table to ensure better accessibility and usability on smaller screens.

Relevant Technical Choices

  • Calculate newIdx based on array length, if length is zero assign 1 to the new row

Testing Instructions

  • Go to NPMS
  • Open Project Page
  • Open any Project
  • Add row to empty child table

Additional Information:

None

Screenshot/Screencast

Before:

Add.Row-1753272231002.mp4

After:

Fix.Child.table.-1753272061638.mp4

Checklist

  • I have carefully reviewed the code before submitting it for review.
  • This code is adequately covered by unit tests to validate its functionality.
  • I have conducted thorough testing to ensure it functions as intended.
  • A member of the QA team has reviewed and tested this PR (To be checked by QA or code reviewer)

@niraj2477 niraj2477 merged commit 7fef371 into develop Jul 29, 2025
6 of 8 checks passed
@Siddhantsingh1230 Siddhantsingh1230 deleted the fix/childtable branch August 7, 2025 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants