fix: fix table height
1. fix table height when the magicInput has opened search menu 2. fix table height when the page has sub tab Change-Id: I5f57030d65d0d7e17681d0579fc57c7441e1ecfa
This commit is contained in:
parent
e1893756d6
commit
961d6d21e1
@ -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>
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user