-
-
Notifications
You must be signed in to change notification settings - Fork 362
feat(Table): add ReloadColumnVisibleFromBrowserAsync method #7011
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
cb0f351
持久化列的显隐到bb-table-column-visiable-{ClientTableName}
braia123 2fb6189
Merge branch 'main' into Table-ShowColumnList
ArgoZhang afabc3c
refactor: 增加持久化逻辑
ArgoZhang 1ed5f73
refactor: 增加本地持久化方法
ArgoZhang 2473a62
refactor: 增加空兼容
ArgoZhang 6391a13
feat: 增加 ColumnVisibleItemConverter 标签
ArgoZhang 617da44
refactor: 更新条件
ArgoZhang efe8ee9
refactor: 更新加载逻辑
ArgoZhang 3658225
doc: 更新文档
ArgoZhang 1efa7ac
chore: 更新依赖
ArgoZhang 4725210
Merge branch 'main' into Table-ShowColumnList
ArgoZhang 3125599
Merge branch 'main' into Table-ShowColumnList
ArgoZhang a0810c3
test: 增加单元测试
ArgoZhang 5c75c7a
feat: 增加 ReloadColumnVisibleFromBrowserAsync 方法
ArgoZhang df533b3
test: 更新单元测试
ArgoZhang d7318c1
chore: bump version 9.11.5-beta08
ArgoZhang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,8 @@ | |
| // See the LICENSE file in the project root for more information. | ||
| // Maintainer: Argo Zhang([email protected]) Website: https://www.blazor.zone | ||
|
|
||
| using System.Text.Json; | ||
|
|
||
| namespace BootstrapBlazor.Components; | ||
|
|
||
| public partial class Table<TItem> | ||
|
|
@@ -155,7 +157,10 @@ private async Task OnToggleColumnVisible(string columnName, bool visible) | |
| { | ||
| _resetColumns = true; | ||
| } | ||
|
|
||
| if(ClientTableName != null && ShowColumnList) | ||
| { | ||
| await JSRuntime.InvokeVoidAsync("localStorage.setItem", "bb-table-column-visiable-"+ClientTableName, JsonSerializer.Serialize(_visibleColumns) ?? ""); | ||
| } | ||
| if (OnColumnVisibleChanged != null) | ||
| { | ||
| await OnColumnVisibleChanged(columnName, visible); | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.