Fix/shifting html tables to tanstack tables#1508
Fix/shifting html tables to tanstack tables#1508devlopharsh wants to merge 4 commits intoeclipse-sw360:mainfrom
Conversation
Signed-off-by: developharsh <harsh237hk@gmail.com>
Signed-off-by: developharsh <harsh237hk@gmail.com>
Signed-off-by: developharsh <harsh237hk@gmail.com>
deo002
left a comment
There was a problem hiding this comment.
These changes are enough for now. Please fix these. We will go through another iteration then.
| @@ -9,17 +9,19 @@ | |||
| // SPDX-License-Identifier: EPL-2.0 | |||
| // License-Filename: LICENSE | |||
|
|
|||
There was a problem hiding this comment.
Remove unused components such as src/components/Attachments/TiltleAttachment/TitleAttachment.tsx, src/components/Attachments/TableAttachment/TableAttachment.tsx etc. Identify components which are no longer used in the Attachments table and remove them.
| id: 'filename', | ||
| header: t('File name'), | ||
| meta: { | ||
| headerClassName: 'headlabel content-middle sorting_asc', |
There was a problem hiding this comment.
these styles are not used anywhere: headlabel content-middle sorting_asc. They can be removed from all the columns, and so can be the headerClassName from meta struct.
There was a problem hiding this comment.
As far as I understand, the src/components/sw360/Table/Components.tsx requires no changes for this feature. It should be kept as is.
| <div className='form-group'> | ||
| <select | ||
| name='attachmentType' | ||
| className='attachmentType toplabelledInput form-control' |
There was a problem hiding this comment.
Same for these css classes(attachmentType, toplabelledInput). They are not defined anywhere and must be removed. Please remove all the redundant css.
| <select | ||
| name='attachmentType' | ||
| className='attachmentType toplabelledInput form-control' | ||
| onChange={(e) => handleInputChange(e, row.index)} |
There was a problem hiding this comment.
AttachmentType does not change. Please check.
| <input | ||
| type='text' | ||
| className='toplabelledInput form-control' | ||
| placeholder='Enter comments' |
There was a problem hiding this comment.
I cannot type in a comment. Please check. I loose focus after typing a character.
There was a problem hiding this comment.
This is a known problem with the tanstack table and src/app/[locale]/projects/components/Obligations/ObligationsView/UpdateCommentModal.tsx can be used for it after making it a generic component.
Issue : #1505
Summary
Migrate Edit Attachments from raw HTML to TanStack while preserving existing layout, CSS classes, and delete modal behavior.
Add styling hooks and header span support to SW360Table for compatibility.
Extend TanStack row metadata typing for row class/id usage.
Changed Files
src/components/Attachments/EditAttachments.tsx
src/components/sw360/Table/Components.tsx
src/object-types/Pageable.ts
global.d.ts
package.json
Build / Check Command
suggested reviewer
@deo002