Skip to content

Commit c63a148

Browse files
committed
feat!: #617 change default debounce from 1000ms to 300ms
1 parent 7a39607 commit c63a148

File tree

6 files changed

+7
-9
lines changed

6 files changed

+7
-9
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
- `StandardBehaviors.AfterDelete` is now `AfterDeleteAsync` and has a different signature and semantics. Instead of modifying the resulting `item` and `includeTree` with `ref` parameters, these values can be optionally overridden by returning an ItemResult with its `Object` and `IncludeTree` properties populated with non-null values.
88
- `ViewModel.$getErrors` now returns a `string[]` instead of a `Generator<string>`.
99
- `IntelliTect.Coalesce.AuditLogging` now uses stored procedures by default to upsert audit log entries. You can disable this (e.g. if your application lacks permission to create/update stored procedures) by chaining `.WithStoredProcedures(false)` when you configure audit logging.
10+
- The default debounce timer for auto-saves and auto-loads on ViewModels has changed from 1000ms to 300ms.
1011
- The CommonJS build of coalesce-vue has been dropped - only the ESM build remains. Most projects should be unaffected.
1112

1213
## Features

src/coalesce-vue-vuetify3/src/components/admin/c-admin-audit-log-page.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ if (userPropMeta.value && "foreignKey" in userPropMeta.value) {
414414
}
415415
416416
listVm.$load();
417-
listVm.$useAutoLoad({ wait: 100 });
417+
listVm.$useAutoLoad();
418418
419419
defineExpose({
420420
/** Support for common convention of exposing 'pageTitle' from router-view hosted components. */

src/coalesce-vue-vuetify3/src/components/admin/c-admin-editor-page.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ onMounted(async () => {
143143
() => effectiveAutoSave.value,
144144
(autoSave) => {
145145
if (autoSave) {
146-
viewModel.$startAutoSave(instance!, { wait: 500 });
146+
viewModel.$startAutoSave(instance!);
147147
} else {
148148
viewModel.$stopAutoSave();
149149
}

src/coalesce-vue-vuetify3/src/components/admin/c-admin-table.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ onMounted(() => {
389389
() => effectiveAutoSave.value,
390390
(effectiveAutoSave) => {
391391
if (effectiveAutoSave && !viewModel.value.$isAutoSaveEnabled) {
392-
viewModel.value.$startAutoSave(instance, { wait: 500 });
392+
viewModel.value.$startAutoSave(instance);
393393
} else if (!effectiveAutoSave && viewModel.value.$isAutoSaveEnabled) {
394394
viewModel.value.$stopAutoSave();
395395
}

src/coalesce-vue/src/viewmodel.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1103,7 +1103,7 @@ export abstract class ViewModel<
11031103
}
11041104

11051105
const {
1106-
wait = 1000,
1106+
wait = 300,
11071107
predicate = undefined,
11081108
debounce: debounceOptions,
11091109
} = options;
@@ -1790,7 +1790,7 @@ export abstract class ListViewModel<
17901790
vue = getPublicInstance(vue);
17911791

17921792
const {
1793-
wait = 1000,
1793+
wait = 300,
17941794
predicate = undefined,
17951795
debounce: debounceOptions,
17961796
} = options;

templates/Coalesce.Vue.Template/content/Coalesce.Starter.Vue.Web/src/views/WidgetEdit.vue

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,7 @@ const form = useForm();
5757
// The properties on the generated ViewModels are already reactive.
5858
// ViewModels and ListViewModels don't need to be wrapped in ref/reactive.
5959
const item = new WidgetViewModel();
60-
item.$useAutoSave({
61-
wait: 500,
62-
debounce: { maxWait: 3000 },
63-
});
60+
item.$useAutoSave();
6461
6562
(async function onCreated() {
6663
if (props.id) {

0 commit comments

Comments
 (0)