From 82cf8226020ebbba86bb06a156310c3ad467cb29 Mon Sep 17 00:00:00 2001 From: Sasha Koshka Date: Sun, 25 Aug 2024 01:32:44 -0400 Subject: [PATCH] Update NumberInput to use new TextInput methods --- numberinput.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/numberinput.go b/numberinput.go index a4ca433..4fe0396 100644 --- a/numberinput.go +++ b/numberinput.go @@ -75,13 +75,13 @@ func (this *NumberInput) Dot () text.Dot { // Value returns the value of the input. func (this *NumberInput) Value () float64 { - value, _ := strconv.ParseFloat(this.input.Text(), 64) + value, _ := strconv.ParseFloat(this.input.Value(), 64) return value } // SetValue sets the value of the input. func (this *NumberInput) SetValue (value float64) { - this.input.SetText(strconv.FormatFloat(value, 'g', -1, 64)) + this.input.SetValue(strconv.FormatFloat(value, 'g', -1, 64)) } // OnValueChange specifies a function to be called when the user edits the input