@lvce-editor/find-widget-worker 3.3.0 → 3.5.0
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.
|
@@ -2471,7 +2471,7 @@ const getSearchFieldButtonVirtualDom = button => {
|
|
|
2471
2471
|
}];
|
|
2472
2472
|
};
|
|
2473
2473
|
|
|
2474
|
-
const getSearchFieldVirtualDom = (name, placeholder, onInput, insideButtons, outsideButtons, onFocus, extraClassName) => {
|
|
2474
|
+
const getSearchFieldVirtualDom = (name, placeholder, onInput, insideButtons, outsideButtons, onFocus, extraClassName, autofocus = false) => {
|
|
2475
2475
|
const dom = [{
|
|
2476
2476
|
childCount: 2,
|
|
2477
2477
|
className: mergeClassNames(SearchField, extraClassName),
|
|
@@ -2487,7 +2487,10 @@ const getSearchFieldVirtualDom = (name, placeholder, onInput, insideButtons, out
|
|
|
2487
2487
|
onInput,
|
|
2488
2488
|
placeholder,
|
|
2489
2489
|
spellcheck: false,
|
|
2490
|
-
type: TextArea
|
|
2490
|
+
type: TextArea,
|
|
2491
|
+
...(autofocus ? {
|
|
2492
|
+
autofocus: true
|
|
2493
|
+
} : {})
|
|
2491
2494
|
}, {
|
|
2492
2495
|
childCount: insideButtons.length,
|
|
2493
2496
|
className: SearchFieldButtons,
|
|
@@ -2514,7 +2517,7 @@ const getFindWidgetFindVirtualDom = (matchCountText, buttons, fieldButtons, matc
|
|
|
2514
2517
|
childCount: 2,
|
|
2515
2518
|
className: FindWidgetFind,
|
|
2516
2519
|
type: Div
|
|
2517
|
-
}, ...getSearchFieldVirtualDom(SearchValue, find(), HandleInput, fieldButtons, [], HandleFocus, extraClassName), {
|
|
2520
|
+
}, ...getSearchFieldVirtualDom(SearchValue, find(), HandleInput, fieldButtons, [], HandleFocus, extraClassName, inputFocused), {
|
|
2518
2521
|
childCount: 1 + buttons.length,
|
|
2519
2522
|
className: 'FindWidgetActions',
|
|
2520
2523
|
type: Div
|
|
@@ -2530,7 +2533,7 @@ const getFindWidgetReplaceVirtualDom = (replaceExpanded, replaceButtons, replace
|
|
|
2530
2533
|
childCount: 1 + replaceButtons.length,
|
|
2531
2534
|
className: FindWidgetReplace,
|
|
2532
2535
|
type: Div
|
|
2533
|
-
}, ...getSearchFieldVirtualDom(ReplaceValue, replace(), HandleReplaceInput, [], [], HandleReplaceFocus, extraClassName), ...replaceButtons.flatMap(getIconButtonVirtualDom)];
|
|
2536
|
+
}, ...getSearchFieldVirtualDom(ReplaceValue, replace(), HandleReplaceInput, [], [], HandleReplaceFocus, extraClassName, replaceInputFocused), ...replaceButtons.flatMap(getIconButtonVirtualDom)];
|
|
2534
2537
|
};
|
|
2535
2538
|
|
|
2536
2539
|
const getResizerVirtualDom = () => {
|