diff options
author | fenn-cs <fenn25.fn@gmail.com> | 2023-12-08 18:02:14 +0100 |
---|---|---|
committer | John Molakvoæ <skjnldsv@protonmail.com> | 2024-01-15 09:39:03 +0100 |
commit | b5edb389bcd4235c891836b8d4ddd34e70502f10 (patch) | |
tree | 39c558ffde1352f329db613825399f76fffe8e45 /apps/files_sharing | |
parent | 67e3367c48aaa4f2c9aecde1652b38e2340ae185 (diff) | |
download | nextcloud-server-b5edb389bcd4235c891836b8d4ddd34e70502f10.tar.gz nextcloud-server-b5edb389bcd4235c891836b8d4ddd34e70502f10.zip |
Allow user to finish typing date before formatting
Debounce `onExpirationChange` to avoid calling `formatDateToString`
on invalid on uncompletely inputed date strings.
Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
Diffstat (limited to 'apps/files_sharing')
-rw-r--r-- | apps/files_sharing/src/mixins/SharesMixin.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/apps/files_sharing/src/mixins/SharesMixin.js b/apps/files_sharing/src/mixins/SharesMixin.js index 41bdf302f7a..b76b72cebe9 100644 --- a/apps/files_sharing/src/mixins/SharesMixin.js +++ b/apps/files_sharing/src/mixins/SharesMixin.js @@ -221,10 +221,9 @@ export default { * * @param {Date} date */ - onExpirationChange(date) { + onExpirationChange: debounce((date) => { this.share.expireDate = this.formatDateToString(new Date(date)) - }, - + }, 500), /** * Uncheck expire date * We need this method because @update:checked |