🐛 (base): Correcciones de visualización de Pager
Ajusta el cálculo de la ventana de páginas cerca de los extremos, convierte la elipsis en una celda `.page-link` real (antes texto suelto sin borde/fondo), separa el texto visible del aria-label accesible en los botones anterior/siguiente, añade `with_align()` y ajusta el ancho del campo de salto al número de dígitos.
This commit is contained in:
parent
3b01894024
commit
12c14afbf6
6 changed files with 349 additions and 22 deletions
|
|
@ -75,6 +75,8 @@ pub struct Button {
|
|||
value: AttrValue,
|
||||
/// Devuelve la etiqueta del botón.
|
||||
label: Attr<L10n>,
|
||||
/// Devuelve el texto emergente del botón (atributo `title`).
|
||||
title: Attr<L10n>,
|
||||
/// Devuelve si el botón recibe el foco automáticamente al cargar la página.
|
||||
autofocus: bool,
|
||||
/// Devuelve si el botón está deshabilitado.
|
||||
|
|
@ -102,6 +104,7 @@ impl Component for Button {
|
|||
(self.props())
|
||||
name=[self.name().get()]
|
||||
value=[self.value().get()]
|
||||
title=[self.title().lookup(cx)]
|
||||
autofocus[*self.autofocus()]
|
||||
disabled[*self.disabled()]
|
||||
{
|
||||
|
|
@ -192,6 +195,13 @@ impl Button {
|
|||
self
|
||||
}
|
||||
|
||||
/// Establece o elimina el texto emergente del botón (basta pasar `None` para quitarlo).
|
||||
#[builder_fn]
|
||||
pub fn with_title(mut self, title: impl Into<Option<L10n>>) -> Self {
|
||||
self.title.alter_opt(title.into());
|
||||
self
|
||||
}
|
||||
|
||||
/// Establece si el botón recibe el foco automáticamente al cargar la página.
|
||||
#[builder_fn]
|
||||
pub fn with_autofocus(mut self, autofocus: bool) -> Self {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue