@canonical/react-components 4.5.1 → 4.5.2
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.
|
@@ -279,6 +279,13 @@ const MultiSelect = _ref4 => {
|
|
|
279
279
|
"aria-label": label || placeholder || "Search",
|
|
280
280
|
disabled: disabled,
|
|
281
281
|
autoComplete: "off",
|
|
282
|
+
onMouseDown: event => {
|
|
283
|
+
// When displayed as an input, clicking inside the input should not clear
|
|
284
|
+
// the text (e.g. if the user wants to edit what they've typed).
|
|
285
|
+
if (variant === "search") {
|
|
286
|
+
event.stopPropagation();
|
|
287
|
+
}
|
|
288
|
+
},
|
|
282
289
|
onChange: value => {
|
|
283
290
|
updateFilter(value);
|
|
284
291
|
// reopen if dropdown has been closed via ESC
|
|
@@ -270,6 +270,13 @@ export var MultiSelect = _ref4 => {
|
|
|
270
270
|
"aria-label": label || placeholder || "Search",
|
|
271
271
|
disabled: disabled,
|
|
272
272
|
autoComplete: "off",
|
|
273
|
+
onMouseDown: event => {
|
|
274
|
+
// When displayed as an input, clicking inside the input should not clear
|
|
275
|
+
// the text (e.g. if the user wants to edit what they've typed).
|
|
276
|
+
if (variant === "search") {
|
|
277
|
+
event.stopPropagation();
|
|
278
|
+
}
|
|
279
|
+
},
|
|
273
280
|
onChange: value => {
|
|
274
281
|
updateFilter(value);
|
|
275
282
|
// reopen if dropdown has been closed via ESC
|