Skip to content

Commit

Permalink
fix(Table): calc body height incorrect on CardView mode (#4017)
Browse files Browse the repository at this point in the history
* fix: 修复 CardView 模式下未观察 Toolbar 与 pages

* chore: bump version 8.8.2
  • Loading branch information
ArgoZhang authored Aug 10, 2024
1 parent 5d5624b commit 605b9ef
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/BootstrapBlazor/BootstrapBlazor.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<Version>8.8.2-beta05</Version>
<Version>8.8.2</Version>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
Expand Down
28 changes: 14 additions & 14 deletions src/BootstrapBlazor/Components/Table/Table.razor.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,20 +88,20 @@ export function reset(id) {
}

setCopyColumn(table)
}

// popover
const toolbar = [...table.el.children].find(i => i.classList.contains('table-toolbar'))
if (toolbar) {
const right = toolbar.querySelector('.table-column-right')
if (right) {
setToolbarDropdown(table, right)
}
table.toolbar = toolbar;
// popover
const toolbar = [...table.el.children].find(i => i.classList.contains('table-toolbar'))
if (toolbar) {
const right = toolbar.querySelector('.table-column-right')
if (right) {
setToolbarDropdown(table, right)
}

table.pages = [...table.el.children].find(i => i.classList.contains('nav-pages'));
table.toolbar = toolbar;
}

table.pages = [...table.el.children].find(i => i.classList.contains('nav-pages'));

setBodyHeight(table)

setColumnToolboxListener(table);
Expand Down Expand Up @@ -271,15 +271,15 @@ const check = table => {

const setBodyHeight = table => {
const el = table.el
const children = [...el.children]
const search = children.find(i => i.classList.contains('table-search'))
table.search = search;

if (isVisible(el) === false) {
table.loopCheckHeightHandler = requestAnimationFrame(() => check(table));
return;
}

const children = [...el.children]
const search = children.find(i => i.classList.contains('table-search'))
table.search = search;

let searchHeight = 0
if (search) {
searchHeight = getOuterHeight(search)
Expand Down

0 comments on commit 605b9ef

Please sign in to comment.