Skip to content

Commit

Permalink
fix: loading icon className missing
Browse files Browse the repository at this point in the history
  • Loading branch information
zombieJ committed Aug 27, 2021
1 parent d6a5c27 commit 9152995
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/OptionList/Column.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ export default function Column({
[`${menuItemPrefixCls}-expand`]: !isMergedLeaf,
[`${menuItemPrefixCls}-active`]: openKey === value,
[`${menuItemPrefixCls}-disabled`]: disabled,
[`${menuItemPrefixCls}-loading`]: isLoading,
})}
style={dropdownMenuColumnStyle}
role="menuitemcheckbox"
Expand Down Expand Up @@ -121,7 +122,7 @@ export default function Column({
<div className={`${menuItemPrefixCls}-expand-icon`}>{expandIcon}</div>
)}
{isLoading && loadingIcon && (
<div className={`${menuItemPrefixCls}-loading`}>{loadingIcon}</div>
<div className={`${menuItemPrefixCls}-loading-icon`}>{loadingIcon}</div>
)}
</li>
);
Expand Down
3 changes: 3 additions & 0 deletions tests/index.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,9 @@ describe('Cascader.Basic', () => {
}),
]);

expect(wrapper.exists('.rc-cascader-menu-item-loading')).toBeTruthy();
expect(wrapper.exists('.rc-cascader-menu-item-loading-icon')).toBeTruthy();

// Fill data
wrapper.setProps({
options: [
Expand Down

1 comment on commit 9152995

@vercel
Copy link

@vercel vercel bot commented on 9152995 Aug 27, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.