Skip to content

Commit 7dbb479

Browse files
committed
fix(FR-823): log message scroll bar is too wide when logs are empty. (#3487)
Resolves #3486 ([FR-823](https://lablup.atlassian.net/browse/FR-823)) # Conditionally set table scroll height in ErrorLogList This PR modifies the `ErrorLogList` component to conditionally set the vertical scroll height. When there are no error logs to display (filtered log data with `isError` is empty), the vertical scroll height is set to `undefined` instead of a fixed calculation. This prevents unnecessary scrollbars from appearing when there's no error data to scroll through. **Checklist:** - [ ] Documentation - [ ] Minium required manager version - [ ] Specific setting for review (eg., KB link, endpoint or how to setup) - [ ] Minimum requirements to check during review - [ ] Test case(s) to demonstrate the difference of before/after [FR-823]: https://lablup.atlassian.net/browse/FR-823?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
1 parent 5fff068 commit 7dbb479

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

react/src/components/ErrorLogList.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,13 @@ const ErrorLogList: React.FC<{
277277
}
278278
: false
279279
}
280-
scroll={{ x: 'max-content', y: 'calc(100vh - 400px)' }}
280+
scroll={{
281+
x: 'max-content',
282+
y:
283+
_.filter(filteredLogData, (log) => log.isError).length === 0
284+
? undefined
285+
: 'calc(100vh - 400px)',
286+
}}
281287
dataSource={
282288
checkedShowOnlyError
283289
? _.filter(filteredLogData, (log) => {

0 commit comments

Comments
 (0)