Skip to content

Commit 71e0ecf

Browse files
fix(web): SearchBoxWithPillSuggestions example
1 parent 19f8734 commit 71e0ecf

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

packages/web/examples/SearchBoxWithPillSuggestions/src/index.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ body {
1515
.col {
1616
flex: 1;
1717
padding: 15px;
18+
max-width: 100%;
1819
}
1920

2021
.row > .col:first-child {
2122
border-right: 1px solid #ccc;
22-
max-width: 400px;
2323
}
2424

2525
.row > .col:last-child {
@@ -152,6 +152,7 @@ body {
152152
display: flex;
153153
gap: 10px;
154154
overflow: auto;
155+
margin-top: 10px;
155156
}
156157
.pill-wrapper::-webkit-scrollbar {
157158
height: 0px;

packages/web/examples/SearchBoxWithPillSuggestions/src/index.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const Main = () => {
2020
<div className="row">
2121
<div className="col">
2222
<SearchBox
23-
title="SearchBox"
23+
title="SearchBox with pill suggestions"
2424
defaultValue={'Free Guy'}
2525
dataField={['original_title', 'original_title.search']}
2626
componentId="MoviesSensor"
@@ -34,7 +34,7 @@ const Main = () => {
3434
error,
3535
data,
3636
value,
37-
downshiftProps: { isOpen, getItemProps },
37+
downshiftProps: { getItemProps },
3838
}) => {
3939
if (loading) {
4040
return <div>Fetching Suggestions.</div>;
@@ -46,7 +46,7 @@ const Main = () => {
4646
</div>
4747
);
4848
}
49-
return isOpen && Boolean(value.length) ? (
49+
return Boolean(value.length) ? (
5050
<div className="pill-wrapper">
5151
{data.map((suggestion, index) => (
5252
<button
@@ -63,9 +63,7 @@ const Main = () => {
6363
) : null;
6464
}}
6565
/>
66-
</div>
67-
68-
<div className="col">
66+
<br />
6967
<ReactiveList
7068
componentId="SearchResult"
7169
dataField="original_title"

0 commit comments

Comments
 (0)