From 30eb5416f377b26b0ecbb26514a904bddd7c219e Mon Sep 17 00:00:00 2001 From: Tim Down <158919+timdown@users.noreply.github.com> Date: Thu, 24 Oct 2024 11:12:03 +0100 Subject: [PATCH] Merge pull request #21353 from overleaf/td-search-panel-focus Pass main-field attribute through to form control in BS3 GitOrigin-RevId: 58ac2f4a18e098b35e4d4b14aa18eb013e4898e4 --- .../js/features/ui/components/ol/ol-form-control.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/services/web/frontend/js/features/ui/components/ol/ol-form-control.tsx b/services/web/frontend/js/features/ui/components/ol/ol-form-control.tsx index 3aba265cac..d698cf4971 100644 --- a/services/web/frontend/js/features/ui/components/ol/ol-form-control.tsx +++ b/services/web/frontend/js/features/ui/components/ol/ol-form-control.tsx @@ -7,9 +7,12 @@ import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/boots type OLFormControlProps = ComponentProps & { bs3Props?: Record 'data-ol-dirty'?: unknown + 'main-field'?: any // For the CM6's benefit in the editor search panel } -type BS3FormControlProps = ComponentProps +type BS3FormControlProps = ComponentProps & { + 'main-field'?: any +} const OLFormControl = forwardRef( (props, ref) => { @@ -53,6 +56,7 @@ const OLFormControl = forwardRef( onInvalid: rest.onInvalid as BS3FormControlProps['onInvalid'], prepend: rest.prepend, append: rest.append, + 'main-field': rest['main-field'], ...bs3Props, }