Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
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 <[email protected]>
  • Loading branch information
susnux committed Jan 15, 2025
commit 214a084d922b63fb85eb4f0f51730aa0391ee30d
7 changes: 4 additions & 3 deletions apps/files_sharing/src/mixins/SharesMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
},
Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion apps/files_sharing/src/views/SharingDetailsTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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" />
Expand Down