mirror of
https://github.com/ant-design/ant-design.git
synced 2025-08-06 16:06:28 +08:00
lint: fix merge branch lint error
This commit is contained in:
parent
90b4d05a29
commit
80db8eaf3b
@ -7,7 +7,10 @@ export function getTargetRect(target: BindElement): DOMRect {
|
||||
}
|
||||
|
||||
export function getFixedTop(placeholderRect: DOMRect, targetRect: DOMRect, offsetTop?: number) {
|
||||
if (offsetTop !== undefined && Math.round(targetRect.top) > Math.round(placeholderRect.top) - offsetTop) {
|
||||
if (
|
||||
offsetTop !== undefined &&
|
||||
Math.round(targetRect.top) > Math.round(placeholderRect.top) - offsetTop
|
||||
) {
|
||||
return offsetTop + targetRect.top;
|
||||
}
|
||||
return undefined;
|
||||
@ -18,7 +21,10 @@ export function getFixedBottom(
|
||||
targetRect: DOMRect,
|
||||
offsetBottom?: number,
|
||||
) {
|
||||
if (offsetBottom !== undefined && Math.round(targetRect.bottom) < Math.round(placeholderRect.bottom) + offsetBottom) {
|
||||
if (
|
||||
offsetBottom !== undefined &&
|
||||
Math.round(targetRect.bottom) < Math.round(placeholderRect.bottom) + offsetBottom
|
||||
) {
|
||||
const targetBottomOffset = window.innerHeight - targetRect.bottom;
|
||||
return offsetBottom + targetBottomOffset;
|
||||
}
|
||||
|
@ -579,7 +579,7 @@ describe('Table.filter', () => {
|
||||
expect(container.querySelectorAll('tbody tr').length).toBe(4);
|
||||
});
|
||||
|
||||
it('can filter children by defaultFilteredValue', async () => {
|
||||
it('can filter children by defaultFilteredValue', () => {
|
||||
const { container } = render(
|
||||
createTable({
|
||||
columns: [
|
||||
@ -674,7 +674,7 @@ describe('Table.filter', () => {
|
||||
await waitFor(() => expect(handleChange).not.toHaveBeenCalled());
|
||||
});
|
||||
|
||||
it('three levels menu', async () => {
|
||||
it('three levels menu', () => {
|
||||
const onChange = jest.fn();
|
||||
const filters = [
|
||||
{ text: 'Upper', value: 'Upper' },
|
||||
@ -697,17 +697,7 @@ describe('Table.filter', () => {
|
||||
],
|
||||
},
|
||||
];
|
||||
const { container } = render(
|
||||
createTable({
|
||||
columns: [
|
||||
{
|
||||
...column,
|
||||
filters,
|
||||
},
|
||||
],
|
||||
onChange,
|
||||
}),
|
||||
);
|
||||
const { container } = render(createTable({ columns: [{ ...column, filters }], onChange }));
|
||||
|
||||
expect(renderedNames(container)).toEqual(['Jack', 'Lucy', 'Tom', 'Jerry']);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user