@stoker-platform/web-app 0.5.219 → 0.5.220

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @stoker-platform/web-app
2
2
 
3
+ ## 0.5.220
4
+
5
+ ### Patch Changes
6
+
7
+ - feat: show loading spinner for serverWriteOnly create operations
8
+
3
9
  ## 0.5.219
4
10
 
5
11
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stoker-platform/web-app",
3
- "version": "0.5.219",
3
+ "version": "0.5.220",
4
4
  "type": "module",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "scripts": {
package/src/Form.tsx CHANGED
@@ -4180,7 +4180,7 @@ function RecordForm({
4180
4180
  const docId = doc(dbCollection(db, "tenants", tenantId, labels.collection)).id
4181
4181
 
4182
4182
  setGlobalLoading("+", docId, serverWrite, !(serverWrite || isServerReadOnly))
4183
- if (isServerReadOnly) {
4183
+ if (serverWrite || isServerReadOnly) {
4184
4184
  setIsAddingServer(true)
4185
4185
  }
4186
4186
 
@@ -4211,9 +4211,6 @@ function RecordForm({
4211
4211
  form.setValue("passwordConfirm", "", { shouldDirty: false })
4212
4212
  }
4213
4213
 
4214
- if (isServerReadOnly) {
4215
- setIsAddingServer(false)
4216
- }
4217
4214
  if (serverWrite || isServerReadOnly) {
4218
4215
  if (onSuccess)
4219
4216
  onSuccess({ ...recordToSave, id: docId, Collection_Path: path } as StokerRecord)
@@ -4263,6 +4260,9 @@ function RecordForm({
4263
4260
  }
4264
4261
  })
4265
4262
  .finally(() => {
4263
+ if (serverWrite || isServerReadOnly) {
4264
+ setIsAddingServer(false)
4265
+ }
4266
4266
  setGlobalLoading("-", docId, undefined, !(serverWrite || isServerReadOnly))
4267
4267
  })
4268
4268
  if (!(serverWrite || isServerReadOnly)) {
@@ -5802,7 +5802,8 @@ function RecordForm({
5802
5802
  (operation === "create" && isCreateDisabled) ||
5803
5803
  (operation === "update" && (isUpdateDisabled || isPendingServer)) ||
5804
5804
  isGlobalLoading.has(id) ||
5805
- isSaving
5805
+ isSaving ||
5806
+ isAddingServer
5806
5807
  }
5807
5808
  >
5808
5809
  Save