mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #21353 from overleaf/td-search-panel-focus
Pass main-field attribute through to form control in BS3 GitOrigin-RevId: 58ac2f4a18e098b35e4d4b14aa18eb013e4898e4
This commit is contained in:
parent
ed8fc2747a
commit
30eb5416f3
1 changed files with 5 additions and 1 deletions
|
@ -7,9 +7,12 @@ import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/boots
|
||||||
type OLFormControlProps = ComponentProps<typeof FormControl> & {
|
type OLFormControlProps = ComponentProps<typeof FormControl> & {
|
||||||
bs3Props?: Record<string, unknown>
|
bs3Props?: Record<string, unknown>
|
||||||
'data-ol-dirty'?: unknown
|
'data-ol-dirty'?: unknown
|
||||||
|
'main-field'?: any // For the CM6's benefit in the editor search panel
|
||||||
}
|
}
|
||||||
|
|
||||||
type BS3FormControlProps = ComponentProps<typeof BS3FormControl>
|
type BS3FormControlProps = ComponentProps<typeof BS3FormControl> & {
|
||||||
|
'main-field'?: any
|
||||||
|
}
|
||||||
|
|
||||||
const OLFormControl = forwardRef<HTMLInputElement, OLFormControlProps>(
|
const OLFormControl = forwardRef<HTMLInputElement, OLFormControlProps>(
|
||||||
(props, ref) => {
|
(props, ref) => {
|
||||||
|
@ -53,6 +56,7 @@ const OLFormControl = forwardRef<HTMLInputElement, OLFormControlProps>(
|
||||||
onInvalid: rest.onInvalid as BS3FormControlProps['onInvalid'],
|
onInvalid: rest.onInvalid as BS3FormControlProps['onInvalid'],
|
||||||
prepend: rest.prepend,
|
prepend: rest.prepend,
|
||||||
append: rest.append,
|
append: rest.append,
|
||||||
|
'main-field': rest['main-field'],
|
||||||
...bs3Props,
|
...bs3Props,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue