Skip to content

Commit 57a830a

Browse files
committed
缓存字典设置引用比较器
1 parent 2104888 commit 57a830a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/BootstrapBlazor/Components/Table/Table.razor.Sort.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ private int MultipleSelectColumnLeft()
229229

230230
private bool IsNotFixedColumn() => !(FixedExtendButtonsColumn && IsExtendButtonsInRowHeader) && !(GetVisibleColumns().FirstOrDefault()?.Fixed ?? false);
231231

232-
private ConcurrentDictionary<ITableColumn, bool> LastFixedColumnCache { get; } = new();
232+
private ConcurrentDictionary<ITableColumn, bool> LastFixedColumnCache { get; } = new(ReferenceEqualityComparer.Instance);
233233

234234
private bool IsLastColumn(ITableColumn col) => LastFixedColumnCache.GetOrAdd(col, col =>
235235
{
@@ -244,7 +244,7 @@ private bool IsLastColumn(ITableColumn col) => LastFixedColumnCache.GetOrAdd(col
244244

245245
private bool IsLastExtendButtonColumn() => IsExtendButtonsInRowHeader && !GetVisibleColumns().Any(i => i.Fixed);
246246

247-
private ConcurrentDictionary<ITableColumn, bool> FirstFixedColumnCache { get; } = new();
247+
private ConcurrentDictionary<ITableColumn, bool> FirstFixedColumnCache { get; } = new(ReferenceEqualityComparer.Instance);
248248

249249
private bool IsFirstColumn(ITableColumn col) => FirstFixedColumnCache.GetOrAdd(col, col =>
250250
{

0 commit comments

Comments
 (0)