Skip to content

Commit c1f1dd6

Browse files
committed
fix: clear input on apply
1 parent fd792c7 commit c1f1dd6

File tree

3 files changed

+35
-20
lines changed

3 files changed

+35
-20
lines changed

src/Shared/Components/Plugin/PluginCard.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,16 @@ const PluginCard = ({
6969

7070
{docLink && (
7171
<div className="flexbox dc__gap-4 dc__visible-hover--child dc__align-items-center">
72-
<a href={docLink} className="anchor" target="_blank" rel="noopener noreferrer">
72+
<a
73+
href={docLink}
74+
className="anchor fs-12 fw-6 lh-20"
75+
target="_blank"
76+
rel="noopener noreferrer"
77+
>
7378
Learn more
7479
</a>
7580

76-
<ICBookOpen className="icon-dim-12 dc__no-shrink" />
81+
<ICBookOpen className="icon-dim-12 dc__no-shrink scb-5" />
7782
</div>
7883
)}
7984
</div>

src/Shared/Components/Plugin/PluginTagSelect.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ const PluginTagSelect = ({
9191
controlShouldRenderValue={false}
9292
hideSelectedOptions={false}
9393
blurInputOnSelect={false}
94-
maxMenuHeight={250}
94+
maxMenuHeight={200}
9595
placeholder="Select tags"
9696
inputId="plugin-tag-select"
9797
className="w-150"

src/Shared/Components/ReactSelect/utils.tsx

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -192,23 +192,33 @@ export const commonSelectStyles = getCommonSelectStyle()
192192
export const MenuListWithApplyButton = ({
193193
handleApplyFilter,
194194
...props
195-
}: MenuListProps & { handleApplyFilter: () => void }) => (
196-
<>
197-
<components.MenuList {...props} />
198-
{props.selectProps.options.length > 0 && (
199-
<div className="p-8 dc__position-sticky dc__bottom-0 dc__border-top-n1 bcn-0 dc__bottom-radius-4">
200-
<button
201-
type="button"
202-
className="dc__unset-button-styles w-100 br-4 h-28 flex bcb-5 cn-0 fw-6 lh-28 fs-12 h-28 br-4 pt-5 pr-12 pb-5 pl-12"
203-
onClick={handleApplyFilter}
204-
aria-label="Apply filters"
205-
>
206-
Apply
207-
</button>
208-
</div>
209-
)}
210-
</>
211-
)
195+
}: MenuListProps & { handleApplyFilter: () => void }) => {
196+
const handleApplyClick = () => {
197+
props.selectProps.onInputChange('', {
198+
action: 'set-value',
199+
prevInputValue: props.selectProps.inputValue,
200+
})
201+
handleApplyFilter()
202+
}
203+
204+
return (
205+
<>
206+
<components.MenuList {...props} />
207+
{props.selectProps.options.length > 0 && (
208+
<div className="p-8 dc__position-sticky dc__bottom-0 dc__border-top-n1 bcn-0 dc__bottom-radius-4">
209+
<button
210+
type="button"
211+
className="dc__unset-button-styles w-100 br-4 h-28 flex bcb-5 cn-0 fw-6 lh-28 fs-12 h-28 br-4 pt-5 pr-12 pb-5 pl-12"
212+
onClick={handleApplyClick}
213+
aria-label="Apply filters"
214+
>
215+
Apply
216+
</button>
217+
</div>
218+
)}
219+
</>
220+
)
221+
}
212222

213223
export const MultiSelectValueContainer = ({
214224
title,

0 commit comments

Comments
 (0)