ButtonType.Link - href not rendered when there's a custom attribute and an HTTP call
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 45/100
Hướng nghiên cứu
Start at the Blazor Button component that renders ButtonType.Link, then trace how it combines the To parameter with unmatched custom attributes during rendering. Reproduce the reported behavior with the supplied component and HTTP call, comparing it with the cases where either the custom attribute or the call is removed. Done means the rendered link retains the expected href in the reported scenario.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
When the following is rendered, the <a> tag doesn't have an href attribute:
@page "/counter"
@using BlazorBootstrap
@inject HttpClient HttpClient;
<Button Type="@ButtonType.Link" To="/my-route" moo="moo">Moo</Button>
@code {
protected override async Task OnInitializedAsync()
{
await HttpClient.GetStringAsync("https://jsonplaceholder.typicode.com/posts/1");
}
}
If I remove the custom moo attribute or comment out the HttpClient call in OnInitializedAsync, then the button/link is rendered properly.
To Reproduce
Steps to reproduce the behavior:
- Add a Button with Type=ButtonType.Link and a URL for To and a custom HTML attribute
- Add an HttpClient call in OnInitializedAsync()
- Render the page
Expected behavior
Clicking the button should redirect to the URL specified in the To property.
Screenshots
If applicable, add screenshots to help explain your problem.
Versions (please complete the following information):
- .NET Version: .NET 9
- BlazorBootstrap: 3.4.0
- Blazor WebAssembly / Server: WebAssembly
- Blazor Interactive Render Mode: Auto
- Blazor Interactivity Location: Per page/component
Sample code
See above
GitHub repo
GitHub repo with minimal code to reproduce the issue.
Desktop (please complete the following information):
- OS: macOS, Windows
- Browser: Chrome
- Version: 140.0.7339.80
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context
Add any other context about the problem here.
- Ngôn ngữ chính
- HTML
- Star
- 1.2k
- Fork
- 111
- Merge trung bình
- 4 phút
- Pull request đã merge (30 ngày)
- 55
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của vikramlearning/blazorbootstrap
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
vikramlearning/blazorbootstrap#1388 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
NET 11 SupportĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 28/100
vikramlearning/blazorbootstrap#1362 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
vikramlearning/blazorbootstrap#1346 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Showcase: rich sample websites built with Blazor BootstrapCó thể đã có người làm @gvreddy04 đã nhận 8 ngày trước. Đang mở
vikramlearning/blazorbootstrap#1343 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[New Component] TreeViewĐang mởarea-tree-view new component
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 8/100
vikramlearning/blazorbootstrap#1339 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của vikramlearning/blazorbootstrap
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
DioxusLabs/blitz#1614 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
boxlite-ai/boxlite#2777 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
quality-assurance
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Paul-Austin-Oswego-CSC480-HCI521/gift-app#249 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug P3
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 87/100
Maintainer thường phản hồi trong vòng 1 ngày