@homebound/beam 2.316.0 → 2.316.1
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.
|
@@ -41,8 +41,13 @@ function useComputed(fn, deps) {
|
|
|
41
41
|
// Only trigger a re-render if this is not the 1st autorun. Note
|
|
42
42
|
// that if deps has changed, we're inherently in a re-render so also
|
|
43
43
|
// don't need to trigger an additional re-render.
|
|
44
|
-
if (hasRan)
|
|
44
|
+
if (hasRan) {
|
|
45
|
+
// This can cause 'Cannot update a component while rendering a different component'
|
|
46
|
+
// if one component (the mutator) is updating observable from directly
|
|
47
|
+
// within it's render method. Usually this is rare and can be avoided by
|
|
48
|
+
// only updating observables from within useEffect.
|
|
45
49
|
setTick((tick) => tick + 1);
|
|
50
|
+
}
|
|
46
51
|
});
|
|
47
52
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
48
53
|
}, deps);
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
* returns `homeownerContract`.
|
|
4
4
|
*
|
|
5
5
|
* This is useful for our (non-bound) form fields that will probably have a label,
|
|
6
|
-
* but may not have
|
|
6
|
+
* but may not have a `data-testid` set by the encompassing page.
|
|
7
|
+
*
|
|
8
|
+
* (Bound form fields typically set their test id from their form-state field's key.)
|
|
7
9
|
*/
|
|
8
10
|
export declare function defaultTestId(label: string): string;
|
|
@@ -7,9 +7,13 @@ const change_case_1 = require("change-case");
|
|
|
7
7
|
* returns `homeownerContract`.
|
|
8
8
|
*
|
|
9
9
|
* This is useful for our (non-bound) form fields that will probably have a label,
|
|
10
|
-
* but may not have
|
|
10
|
+
* but may not have a `data-testid` set by the encompassing page.
|
|
11
|
+
*
|
|
12
|
+
* (Bound form fields typically set their test id from their form-state field's key.)
|
|
11
13
|
*/
|
|
12
14
|
function defaultTestId(label) {
|
|
13
|
-
|
|
15
|
+
// Strip `m:4` to `m4` to prevent it from becoming `m_4` which our rtl-utils assumes
|
|
16
|
+
// means "the 4th element with a data-testid value of 'm'".
|
|
17
|
+
return (0, change_case_1.camelCase)(label.replace(":", ""));
|
|
14
18
|
}
|
|
15
19
|
exports.defaultTestId = defaultTestId;
|