mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-03 04:30:06 +08:00
fix: when fullscreen is false, the element returned by dateFullCellRender cannot be interactive (#34614)
* fix: when fullscreen is false, the element returned by dateFullCellRender cannot be interactive * test: add test for Calendar
This commit is contained in:
parent
232e236215
commit
4debb88f24
@ -403,4 +403,20 @@ describe('Calendar', () => {
|
||||
);
|
||||
expect(wrapper.find('.bamboo').first().text()).toEqual('Light');
|
||||
});
|
||||
|
||||
it('when fullscreen is false, the element returned by dateFullCellRender should be interactive', () => {
|
||||
const onClick = jest.fn();
|
||||
const wrapper = mount(
|
||||
<Calendar
|
||||
fullscreen={false}
|
||||
dateFullCellRender={() => (
|
||||
<div className="bamboo" onClick={onClick}>
|
||||
Light
|
||||
</div>
|
||||
)}
|
||||
/>,
|
||||
);
|
||||
wrapper.find('.bamboo').first().simulate('click');
|
||||
expect(onClick).toBeCalled();
|
||||
});
|
||||
});
|
||||
|
@ -70,6 +70,10 @@
|
||||
line-height: 18px;
|
||||
}
|
||||
}
|
||||
|
||||
.@{calendar-picker-prefix-cls}-cell::before {
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
|
||||
// ========================== Full ==========================
|
||||
|
Loading…
Reference in New Issue
Block a user