Skip to content

Commit ac75954

Browse files
authored
fix: extra foot miss style (#738)
1 parent 6fef569 commit ac75954

File tree

4 files changed

+3
-19
lines changed

4 files changed

+3
-19
lines changed

src/PickerInput/Popup/Footer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export default function Footer(props: FooterProps) {
107107

108108
return (
109109
<div className={`${prefixCls}-footer`}>
110-
{extraNode}
110+
{extraNode && <div className={`${prefixCls}-footer-extra`}>{extraNode}</div>}
111111
{rangeNode}
112112
</div>
113113
);

src/utils/getExtraFooter.tsx

Lines changed: 0 additions & 16 deletions
This file was deleted.

tests/picker.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ describe('Picker.Basic', () => {
498498
);
499499

500500
function matchFooter(mode: string) {
501-
expect(document.querySelector('.rc-picker-footer').textContent).toEqual(mode);
501+
expect(document.querySelector('.rc-picker-footer-extra').textContent).toEqual(mode);
502502
expect(renderExtraFooter.mock.calls[renderExtraFooter.mock.calls.length - 1][0]).toEqual(
503503
mode,
504504
);

tests/range.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ describe('Picker.Range', () => {
144144
<DayRangePicker renderExtraFooter={() => <p>footer</p>} picker="year" />,
145145
);
146146
openPicker(container);
147-
expect(document.querySelector('.rc-picker-footer').textContent).toEqual('footer');
147+
expect(document.querySelector('.rc-picker-footer-extra').textContent).toEqual('footer');
148148
expect(document.querySelectorAll('.rc-picker-header-view')[0].textContent).toEqual(
149149
'1990年-1999年',
150150
);

0 commit comments

Comments
 (0)