Merge "fix: fix table height"

This commit is contained in:
Zuul 2023-09-05 04:21:22 +00:00 committed by Gerrit Code Review
commit de2793ddfb
2 changed files with 13 additions and 3 deletions

View File

@ -346,7 +346,11 @@ class MagicInput extends PureComponent {
<Menu.Item key={it.name}>{it.label}</Menu.Item>
));
return (
<Menu className={styles.menu} onClick={this.handleSelectFilter}>
<Menu
className={styles.menu}
onClick={this.handleSelectFilter}
id="search-items-menu"
>
{this.renderOptionsClose(filters)}
{menuItems}
</Menu>

View File

@ -279,12 +279,18 @@ export default class BaseList extends React.Component {
get tableTopHeight() {
const tableSearchHeader = document.getElementById('sl-table-header-search');
const tableSearchInputItemMenu =
document.getElementById('search-items-menu');
const tableSearchHeight = tableSearchHeader
? tableSearchHeader.scrollHeight
: defaultTableSearchHeight;
const topTotal = navHeight + breadcrumbHeight + tableSearchHeight + padding;
const searchMenuHeight = tableSearchInputItemMenu?.scrollHeight || 0;
const searchHeight = searchMenuHeight
? tableSearchHeight - searchMenuHeight + 10
: tableSearchHeight;
const topTotal = navHeight + breadcrumbHeight + searchHeight + padding;
if (this.hasSubTab) {
return topTotal + tabHeight * 2;
return topTotal + tabHeight * 2 + 20;
}
if (this.hasTab) {
return topTotal + tabHeight;