all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: Yew framework devel list at Proxmox <yew-devel@lists.proxmox.com>,
	Hannes Laimer <h.laimer@proxmox.com>
Subject: Re: [yew-devel] [PATCH yew-widget-toolkit v2 1/2] number: add tooltip to number field
Date: Thu, 9 Oct 2025 13:51:36 +0200	[thread overview]
Message-ID: <39601a36-7960-496d-bd74-9f5559d75074@proxmox.com> (raw)
In-Reply-To: <20251009112502.312917-2-h.laimer@proxmox.com>



On 10/9/25 1:24 PM, Hannes Laimer wrote:
> Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
> ---
>   src/widget/form/number.rs | 5 +++++
>   1 file changed, 5 insertions(+)
> 
> diff --git a/src/widget/form/number.rs b/src/widget/form/number.rs
> index 80f7f6c..ad1a3cd 100644
> --- a/src/widget/form/number.rs
> +++ b/src/widget/form/number.rs
> @@ -368,6 +368,11 @@ pub struct Number<T: NumberTypeInfo> {
>       #[builder_cb(IntoEventCallback, into_event_callback, (String, Option<T>))]
>       #[prop_or_default]
>       pub on_input: Option<Callback<(String, Option<T>)>>,
> +
> +    /// The tooltip.
> +    #[prop_or_default]
> +    #[builder(IntoPropValue, into_prop_value)]
> +    pub tip: Option<AttrValue>,
>   }
>   
>   impl<T: NumberTypeInfo> Default for Number<T> {


please correct me if I'm wrong, but just adding the tip to the 
properties alone wouldn't do anything on its own.

You have to at least use it in the 'view' method, e.g. like this:


---
  let mut input_container: Tooltip = Tooltip::empty()
      .with_std_props(&props.std_props)
      .listeners(list: &props.listeners)
      .tip(props.tip.clone())
---


_______________________________________________
yew-devel mailing list
yew-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/yew-devel


  reply	other threads:[~2025-10-09 11:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-09 11:25 [yew-devel] [PATCH yew-widget-toolkit v2 0/2] use Schema to populate field properties Hannes Laimer
2025-10-09 11:25 ` [yew-devel] [PATCH yew-widget-toolkit v2 1/2] number: add tooltip to number field Hannes Laimer
2025-10-09 11:51   ` Dominik Csapak [this message]
2025-10-09 11:54     ` Hannes Laimer
2025-10-09 11:25 ` [yew-devel] [PATCH yew-widget-toolkit v2 2/2] form: add schema() builder funtion to checkbox, number and field Hannes Laimer
2025-10-09 11:30 ` [yew-devel] [PATCH yew-widget-toolkit v2 0/2] use Schema to populate field properties Dietmar Maurer
2025-10-09 13:32 ` [yew-devel] superseded: " Hannes Laimer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=39601a36-7960-496d-bd74-9f5559d75074@proxmox.com \
    --to=d.csapak@proxmox.com \
    --cc=h.laimer@proxmox.com \
    --cc=yew-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal