]> dgit.raspbian.org Git - nextcloud-desktop.git/commitdiff
Make sure to imperatively set text for spinbox textfield after user breaks binding...
authorClaudio Cambra <claudio.cambra@nextcloud.com>
Mon, 8 May 2023 09:59:01 +0000 (17:59 +0800)
committerClaudio Cambra <claudio.cambra@nextcloud.com>
Thu, 20 Jul 2023 15:17:29 +0000 (23:17 +0800)
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
src/gui/filedetails/ShareDetailsPage.qml

index 304563ef5a8b9d6ccc0b6d6b2e7babdf810d7426..d1bec344f09102b3dcfe85a25d9a7ee513a75954 100644 (file)
@@ -676,7 +676,10 @@ Page {
                     readonly property int dayInMSecs: 24 * 60 * 60 * 1000
                     readonly property int expireDateReduced: Math.floor(root.expireDate / dayInMSecs)
                     // Reset the model data after binding broken on user interact
-                    onExpireDateReducedChanged: value = expireDateReduced
+                    onExpireDateReducedChanged: {
+                        value = expireDateReduced;
+                        expireDateSpinBoxTextField.text = textFromValue(value, locale);
+                    }
 
                     // We can't use JS's convenient Infinity or Number.MAX_VALUE as
                     // JS Number type is 64 bits, whereas QML's int type is only 32 bits
@@ -758,6 +761,8 @@ Page {
                     padding: 0
                     background: null
                     contentItem: NCInputTextField {
+                        id: expireDateSpinBoxTextField
+
                         text: expireDateSpinBox.textFromValue(expireDateSpinBox.value, expireDateSpinBox.locale)
                         readOnly: !expireDateSpinBox.editable
                         validator: expireDateSpinBox.validator