@bpmn-io/properties-panel 3.40.1 → 3.40.3
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/dist/index.esm.js +11 -5
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +11 -5
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -795,12 +795,17 @@ function useStickyIntersectionObserver(ref, scrollContainerSelector, setSticky)
|
|
|
795
795
|
* The `callback` reference is static and can be safely used in external
|
|
796
796
|
* libraries or as a prop that does not cause rerendering of children.
|
|
797
797
|
*
|
|
798
|
+
* The ref update is deferred to useLayoutEffect to prevent stale-closure
|
|
799
|
+
* bugs when Chrome fires blur on elements removed during re-render.
|
|
800
|
+
*
|
|
798
801
|
* @param {Function} callback function with changing reference
|
|
799
802
|
* @returns {Function} static function reference
|
|
800
803
|
*/
|
|
801
804
|
function useStaticCallback(callback) {
|
|
802
805
|
const callbackRef = useRef(callback);
|
|
803
|
-
|
|
806
|
+
useLayoutEffect(() => {
|
|
807
|
+
callbackRef.current = callback;
|
|
808
|
+
});
|
|
804
809
|
return useCallback((...args) => callbackRef.current(...args), []);
|
|
805
810
|
}
|
|
806
811
|
|
|
@@ -2243,7 +2248,7 @@ function ToggleSwitchEntry(props) {
|
|
|
2243
2248
|
inline: inline,
|
|
2244
2249
|
tooltip: tooltip,
|
|
2245
2250
|
element: element
|
|
2246
|
-
}), jsx(Description, {
|
|
2251
|
+
}, element), jsx(Description, {
|
|
2247
2252
|
forId: id,
|
|
2248
2253
|
element: element,
|
|
2249
2254
|
value: description
|
|
@@ -2534,7 +2539,7 @@ function FeelTextfield(props) {
|
|
|
2534
2539
|
};
|
|
2535
2540
|
const handleOnKeyDown = e => {
|
|
2536
2541
|
if (isCmdWithChar(e)) {
|
|
2537
|
-
handleInput.flush();
|
|
2542
|
+
handleInput.flush?.();
|
|
2538
2543
|
}
|
|
2539
2544
|
};
|
|
2540
2545
|
const handleLint = useStaticCallback((lint = []) => {
|
|
@@ -3881,7 +3886,7 @@ function TextArea(props) {
|
|
|
3881
3886
|
};
|
|
3882
3887
|
const handleOnKeyDown = e => {
|
|
3883
3888
|
if (isCmdWithChar(e)) {
|
|
3884
|
-
handleInput.flush();
|
|
3889
|
+
handleInput.flush?.();
|
|
3885
3890
|
}
|
|
3886
3891
|
};
|
|
3887
3892
|
useLayoutEffect(() => {
|
|
@@ -4097,7 +4102,7 @@ function Textfield(props) {
|
|
|
4097
4102
|
}, [value]);
|
|
4098
4103
|
const handleOnKeyDown = e => {
|
|
4099
4104
|
if (isCmdWithChar(e)) {
|
|
4100
|
-
handleInput.flush();
|
|
4105
|
+
handleInput.flush?.();
|
|
4101
4106
|
}
|
|
4102
4107
|
};
|
|
4103
4108
|
return jsxs("div", {
|
|
@@ -4506,6 +4511,7 @@ function Title(props) {
|
|
|
4506
4511
|
class: "bio-properties-panel-popup__title",
|
|
4507
4512
|
children: title
|
|
4508
4513
|
}), children, showCloseButton && jsx("button", {
|
|
4514
|
+
type: "button",
|
|
4509
4515
|
title: closeButtonTooltip,
|
|
4510
4516
|
class: "bio-properties-panel-popup__close",
|
|
4511
4517
|
onClick: onClose,
|