Skip to content

Commit 0e1b8f5

Browse files
authored
Fix SearchWithin label alignment in Form (#2180)
1 parent 2c9bd9e commit 0e1b8f5

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

packages/@react-spectrum/searchwithin/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
"@react-aria/label": "^3.1.2",
3737
"@react-aria/utils": "^3.0.0",
3838
"@react-spectrum/label": "^3.3.3",
39+
"@react-spectrum/form": "^3.2.2",
3940
"@react-spectrum/utils": "^3.0.0",
4041
"@react-types/searchwithin": "3.0.0-alpha.1",
4142
"@react-types/shared": "^3.0.0"

packages/@react-spectrum/searchwithin/src/SearchWithin.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,13 @@ import {FocusableRef} from '@react-types/shared';
1616
import React, {useCallback, useLayoutEffect, useRef, useState} from 'react';
1717
import {SpectrumSearchWithinProps} from '@react-types/searchwithin';
1818
import styles from '@adobe/spectrum-css-temp/components/searchwithin/vars.css';
19+
import {useFormProps} from '@react-spectrum/form';
1920
import {useLabel} from '@react-aria/label';
2021
import {useProvider, useProviderProps} from '@react-spectrum/provider';
2122

2223
function SearchWithin(props: SpectrumSearchWithinProps, ref: FocusableRef<HTMLElement>) {
2324
props = useProviderProps(props);
25+
props = useFormProps(props);
2426
let {styleProps} = useStyleProps(props);
2527
let {labelProps, fieldProps} = useLabel(props);
2628
let {

0 commit comments

Comments
 (0)