Skip to content

Commit e7c7447

Browse files
stopPropagation option
1 parent e88df9b commit e7c7447

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/editor-ui-property/property-input/property-input.tsx

+6
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ interface PlainInputProps {
1919
value?: string | number;
2020
readonly?: boolean;
2121
disabled?: boolean;
22+
stopPropagation?: boolean;
2223

2324
/**
2425
* The pattern attribute specifies a regular expression the form control's value should match. If a non-null value doesn't conform to the constraints set by the pattern value, the ValidityState object's read-only patternMismatch property will be true.
@@ -38,6 +39,7 @@ export function PropertyInput({
3839
readonly,
3940
disabled,
4041
pattern,
42+
stopPropagation,
4143
onChange,
4244
onClick,
4345
}: PropertyInputProps) {
@@ -99,6 +101,10 @@ export function PropertyInput({
99101
const newValue = e.key === "ArrowUp" ? value + step : value - step;
100102
onvalue("" + newValue);
101103
}
104+
105+
if (stopPropagation) {
106+
e.stopPropagation();
107+
}
102108
};
103109

104110
return (

0 commit comments

Comments
 (0)