ButtonType.Link - href not rendered when there's a custom attribute and an HTTP call
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 45/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- HTML
- Estrellas
- 1.2k
- Forks
- 111
- Merge medio
- 4 min
- PR fusionados (30 d)
- 55
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de vikramlearning/blazorbootstrap
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
vikramlearning/blazorbootstrap#1388 ·
Los mantenedores suelen responder en 1 día
-
NET 11 SupportAbierto
Dificultad 3/5 1-2 días Aptitud para principiantes 28/100
vikramlearning/blazorbootstrap#1362 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
vikramlearning/blazorbootstrap#1346 ·
Los mantenedores suelen responder en 1 día
-
Showcase: rich sample websites built with Blazor BootstrapPosiblemente ocupada @gvreddy04 la tomó hace 8 días. Abierto
vikramlearning/blazorbootstrap#1343 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
[New Component] TreeViewAbiertoarea-tree-view new component
Dificultad 5/5 Más de una semana Aptitud para principiantes 8/100
vikramlearning/blazorbootstrap#1339 ·
Los mantenedores suelen responder en 1 día
Todos los issues de vikramlearning/blazorbootstrap
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
DioxusLabs/blitz#1614 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
boxlite-ai/boxlite#2777 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
quality-assurance
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Paul-Austin-Oswego-CSC480-HCI521/gift-app#249 ·
Los mantenedores suelen responder en 1 día
-
bug P3
Dificultad 1/5 Menos de una hora Aptitud para principiantes 87/100
Los mantenedores suelen responder en 1 día