Skip to content

Commit 70af5d4

Browse files
LFDanLudannifysnowystinger
authored
Fix SearchWithin picker so that it doesn't overflow the component width (#2203)
* fix searchwithin picker shrink * increasing searchwithin picker min width Co-authored-by: Danni <[email protected]> Co-authored-by: Robert Snow <[email protected]>
1 parent 04c224c commit 70af5d4

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

packages/@adobe/spectrum-css-temp/components/searchwithin/index.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ governing permissions and limitations under the License.
2929

3030
.spectrum-SearchWithin-picker {
3131
inline-size: auto;
32-
min-inline-size: var(--spectrum-global-dimension-size-900);
33-
flex-shrink: 0;
32+
min-inline-size: var(--spectrum-global-dimension-size-1000);
33+
flex-shrink: 1;
3434

3535
> button {
3636
contain: unset;

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ function render(props: Omit<SpectrumSearchWithinProps, 'children'> = {}, searchF
3333
<Item key="campaigns">Campaigns</Item>
3434
<Item key="audiences">Audiences</Item>
3535
<Item key="tags">Tags</Item>
36+
<Item key="long">This item is very long and word wraps poorly</Item>
3637
</Picker>
3738
</SearchWithin>
3839
);
@@ -46,6 +47,7 @@ function renderReverse(props: Omit<SpectrumSearchWithinProps, 'children'> = {},
4647
<Item key="campaigns">Campaigns</Item>
4748
<Item key="audiences">Audiences</Item>
4849
<Item key="tags">Tags</Item>
50+
<Item key="long">This item is very long and word wraps poorly</Item>
4951
</Picker>
5052
<SearchField placeholder="Search" {...searchFieldProps} onChange={action('change')} onSubmit={action('submit')} />
5153
</SearchWithin>
@@ -65,6 +67,7 @@ function ResizeSearchWithinApp(props) {
6567
<Item key="campaigns">Campaigns</Item>
6668
<Item key="audiences">Audiences</Item>
6769
<Item key="tags">Tags</Item>
70+
<Item key="long">This item is very long and word wraps poorly</Item>
6871
</Picker>
6972
</SearchWithin>
7073
</div>

0 commit comments

Comments
 (0)