fix(files_sharing): Remove debounce from expiration date formatting

This should be done as soon as changed, as the value is not passed to
API but needs to be tracked internally (e.g. if you quickly press
"save").

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This commit is contained in:
Ferdinand Thiessen 2025-01-15 15:46:25 +01:00 committed by provokateurin
parent 02b0c28a2b
commit b7c550ad83
No known key found for this signature in database
2 changed files with 6 additions and 4 deletions

View file

@ -128,7 +128,7 @@ export default {
return this.config.isDefaultExpireDateEnforced
}
if (this.isRemoteShare) {
return this.config.isDefaultRemoteExpireDateEnforced
return this.config.isDefaultRemoteExpireDateEnforced
}
return this.config.isDefaultInternalExpireDateEnforced
},
@ -209,9 +209,10 @@ export default {
*
* @param {Date} date
*/
onExpirationChange: debounce(function(date) {
onExpirationChange(date) {
this.share.expireDate = this.formatDateToString(new Date(date))
}, 500),
},
/**
* Uncheck expire date
* We need this method because @update:checked

View file

@ -144,7 +144,8 @@
:value="new Date(share.expireDate ?? dateTomorrow)"
:min="dateTomorrow"
:max="maxExpirationDateEnforced"
:hide-label="true"
hide-label
:label="t('files_sharing', 'Expiration date')"
:placeholder="t('files_sharing', 'Expiration date')"
type="date"
@input="onExpirationChange" />