|
1 | | -// Licensed to the .NET Foundation under one or more agreements. |
| 1 | +// Licensed to the .NET Foundation under one or more agreements. |
2 | 2 | // The .NET Foundation licenses this file to you under the Apache 2.0 License |
3 | 3 | // See the LICENSE file in the project root for more information. |
4 | 4 | // Maintainer: Argo Zhang([email protected]) Website: https://www.blazor.zone |
@@ -1731,7 +1731,7 @@ public void FixedColumn_Ok() |
1731 | 1731 | builder.OpenComponent<TableColumn<Foo, string>>(0); |
1732 | 1732 | builder.AddAttribute(1, "Field", foo.Name); |
1733 | 1733 | builder.AddAttribute(2, "FieldExpression", Utility.GenerateValueExpression(foo, "Name", typeof(string))); |
1734 | | - builder.AddAttribute(3, nameof(TableColumn<Foo, string>.Fixed), true); |
| 1734 | + builder.AddAttribute(3, nameof(TableColumn<,>.Fixed), true); |
1735 | 1735 | builder.CloseComponent(); |
1736 | 1736 | }); |
1737 | 1737 | pb.Add(a => a.DetailRowTemplate, foo => builder => |
@@ -1972,6 +1972,13 @@ public void FixedMultipleColumn_Ok() |
1972 | 1972 | }); |
1973 | 1973 | }); |
1974 | 1974 | Assert.Contains("left: 36px;", cut.Markup); |
| 1975 | + |
| 1976 | + var table = cut.FindComponent<Table<Foo>>(); |
| 1977 | + table.SetParametersAndRender(pb => |
| 1978 | + { |
| 1979 | + pb.Add(a => a.TableSize, TableSize.Compact); |
| 1980 | + }); |
| 1981 | + Assert.Contains("left: 28px;", cut.Markup); |
1975 | 1982 | } |
1976 | 1983 |
|
1977 | 1984 | [Theory] |
@@ -2650,7 +2657,7 @@ public void ToolbarButton_Ok() |
2650 | 2657 | pb.Add(a => a.TableToolbarTemplate, builder => |
2651 | 2658 | { |
2652 | 2659 | builder.OpenComponent<TableToolbarButton<Foo>>(0); |
2653 | | - builder.AddAttribute(1, nameof(TableToolbarButton<Foo>.Text), "test-after"); |
| 2660 | + builder.AddAttribute(1, nameof(TableToolbarButton<>.Text), "test-after"); |
2654 | 2661 | builder.CloseComponent(); |
2655 | 2662 | }); |
2656 | 2663 | pb.Add(a => a.TableToolbarBeforeTemplate, builder => |
@@ -3257,6 +3264,30 @@ public void ShowFilterHeader_Ok(bool showCheckboxText) |
3257 | 3264 | }); |
3258 | 3265 | }); |
3259 | 3266 | }); |
| 3267 | + |
| 3268 | + if (showCheckboxText == false) |
| 3269 | + { |
| 3270 | + cut.Contains("width: 36px;"); |
| 3271 | + } |
| 3272 | + else |
| 3273 | + { |
| 3274 | + cut.Contains("width: 80px;"); |
| 3275 | + } |
| 3276 | + |
| 3277 | + var table = cut.FindComponent<Table<Foo>>(); |
| 3278 | + table.SetParametersAndRender(pb => |
| 3279 | + { |
| 3280 | + pb.Add(a => a.TableSize, TableSize.Compact); |
| 3281 | + }); |
| 3282 | + |
| 3283 | + if (showCheckboxText == false) |
| 3284 | + { |
| 3285 | + cut.Contains("width: 28px;"); |
| 3286 | + } |
| 3287 | + else |
| 3288 | + { |
| 3289 | + cut.Contains("width: 80px;"); |
| 3290 | + } |
3260 | 3291 | } |
3261 | 3292 |
|
3262 | 3293 | [Theory] |
@@ -7390,6 +7421,7 @@ public void TableSize_Ok() |
7390 | 7421 | { |
7391 | 7422 | pb.Add(a => a.RenderMode, TableRenderMode.Table); |
7392 | 7423 | pb.Add(a => a.TableSize, TableSize.Normal); |
| 7424 | + pb.Add(a => a.IsMultipleSelect, true); |
7393 | 7425 | pb.Add(a => a.OnQueryAsync, OnQueryAsync(localizer)); |
7394 | 7426 | pb.Add(a => a.TableColumns, foo => builder => |
7395 | 7427 | { |
|
0 commit comments