Skip to content

Commit cd3f29b

Browse files
ArgoZhangbraia123water1983
authored
fix(Table): AutoScrollLastSelectedRowToView support ClickSelect mode (#7019)
* 持久化列的显隐到bb-table-column-visiable-{ClientTableName} * refactor: 增加持久化逻辑 * refactor: 增加本地持久化方法 * refactor: 增加空兼容 * feat: 增加 ColumnVisibleItemConverter 标签 * refactor: 更新条件 * refactor: 更新加载逻辑 * doc: 更新文档 * chore: 更新依赖 * test: 增加单元测试 * feat: 增加 ReloadColumnVisibleFromBrowserAsync 方法 * test: 更新单元测试 * chore: bump version 9.11.5-beta08 Co-Authored-By: braia123 <[email protected]> * fix: 支持单选模式下选中行滚动效果 * chore: bump version 9.11.5-beta09 Co-Authored-By: water1983 <[email protected]> * refactor: 增加分号 --------- Co-authored-by: braia123 <[email protected]> Co-authored-by: braia123 <[email protected]> Co-authored-by: water1983 <[email protected]>
1 parent c29d23a commit cd3f29b

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/BootstrapBlazor/BootstrapBlazor.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<Project Sdk="Microsoft.NET.Sdk.Razor">
22

33
<PropertyGroup Condition="'$(VisualStudioVersion)' == '17.0'">
4-
<Version>9.11.5-beta08</Version>
4+
<Version>9.11.5-beta09</Version>
55
</PropertyGroup>
66

77
<PropertyGroup Condition="'$(VisualStudioVersion)' == '18.0'">
8-
<Version>10.0.0-rc.2.1.7</Version>
8+
<Version>10.0.0-rc.2.1.8</Version>
99
</PropertyGroup>
1010

1111
<ItemGroup>

src/BootstrapBlazor/Components/Table/Table.razor.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ export function load(id, method) {
218218
export function scroll(id, align, options = { behavior: 'smooth' }) {
219219
const element = document.getElementById(id);
220220
if (element) {
221-
const selectedRow = [...element.querySelectorAll('.form-check.is-checked')].pop();
221+
const selectedRow = getSelectedRow(element);
222222
if (selectedRow) {
223223
const row = selectedRow.closest('tr');
224224
if (row) {
@@ -229,6 +229,11 @@ export function scroll(id, align, options = { behavior: 'smooth' }) {
229229
}
230230
}
231231

232+
const getSelectedRow = element => {
233+
const rows = [...element.querySelectorAll('tr.active')];
234+
return rows.pop();
235+
}
236+
232237
export function scrollTo(id) {
233238
const element = document.getElementById(id);
234239
if (element) {

0 commit comments

Comments
 (0)