Skip to content

Commit

Permalink
fix: hide clear button when options is empty (#6880)
Browse files Browse the repository at this point in the history
  • Loading branch information
KumJungMin authored Jul 13, 2024
1 parent 01a1d1a commit 38c5d1d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/lib/dropdown/Dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -1138,7 +1138,7 @@ export const Dropdown = React.memo(
};

const createClearIcon = () => {
if (props.value != null && props.showClear && !props.disabled) {
if (props.value != null && props.showClear && !props.disabled && !ObjectUtils.isEmpty(props.options)) {
const clearIconProps = mergeProps(
{
className: cx('clearIcon'),
Expand Down

0 comments on commit 38c5d1d

Please sign in to comment.