nucleus-core-ts 0.9.860 → 0.9.862

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.
@@ -64,11 +64,15 @@ export function ConnectionList({ actions, onNewConnection, reloadToken = 0 }) {
64
64
  // which is where the editor looks for the record it is editing. Saving
65
65
  // triggers a reset, so saving is when the record vanished.
66
66
  useEffect(()=>{
67
- if (list.settled) publishItems();
67
+ // And not when it FAILED. `settled` means the request finished, which a
68
+ // refused one also did — publishing that emptied the store on every
69
+ // failed refetch and took the record the editor was showing with it.
70
+ if (list.settled && !list.error) publishItems();
68
71
  }, [
69
72
  list.items,
70
73
  list.total,
71
- list.settled
74
+ list.settled,
75
+ list.error
72
76
  ]);
73
77
  useEffect(()=>{
74
78
  publishLoading();
@@ -77,11 +77,15 @@ export function EndpointList({ sourceId, actions, onNewEndpoint, onSelect, reloa
77
77
  // which is where the editor looks for the record it is editing. Saving
78
78
  // triggers a reset, so saving is when the record vanished.
79
79
  useEffect(()=>{
80
- if (list.settled) publishItems();
80
+ // And not when it FAILED. `settled` means the request finished, which a
81
+ // refused one also did — publishing that emptied the store on every
82
+ // failed refetch and took the record the editor was showing with it.
83
+ if (list.settled && !list.error) publishItems();
81
84
  }, [
82
85
  list.items,
83
86
  list.total,
84
- list.settled
87
+ list.settled,
88
+ list.error
85
89
  ]);
86
90
  useEffect(()=>{
87
91
  publishLoading();
@@ -88,11 +88,15 @@ export function MappingList({ actions, sourceId, selectedId, reloadToken, onSele
88
88
  // which is where the editor looks for the record it is editing. Saving
89
89
  // triggers a reset, so saving is when the record vanished.
90
90
  useEffect(()=>{
91
- if (list.settled) publishItems();
91
+ // And not when it FAILED. `settled` means the request finished, which a
92
+ // refused one also did — publishing that emptied the store on every
93
+ // failed refetch and took the record the editor was showing with it.
94
+ if (list.settled && !list.error) publishItems();
92
95
  }, [
93
96
  list.items,
94
97
  list.total,
95
- list.settled
98
+ list.settled,
99
+ list.error
96
100
  ]);
97
101
  useEffect(()=>{
98
102
  publishLoading();
@@ -55,11 +55,15 @@ export function RunHistory({ actions, mappingId, refreshKey, onRefresh }) {
55
55
  // reset empties the hook's items before the first page is asked for, and
56
56
  // publishing that emptied the shared store.
57
57
  useEffect(()=>{
58
- if (list.settled) publishRuns();
58
+ // And not when it FAILED. `settled` means the request finished, which a
59
+ // refused one also did — publishing that emptied the store on every
60
+ // failed refetch and took the record the editor was showing with it.
61
+ if (list.settled && !list.error) publishRuns();
59
62
  }, [
60
63
  list.items,
61
64
  list.total,
62
- list.settled
65
+ list.settled,
66
+ list.error
63
67
  ]);
64
68
  useEffect(()=>{
65
69
  publishLoading();