fix(FixedBlock): avoid kanban triggering programmatic scrolling (#1406)

* fix(FixedBlock): avoid kanban triggering programmatic scrolling

* fix: kanban
This commit is contained in:
Dunqing 2023-03-23 12:19:41 +08:00 committed by GitHub
parent 0a25426f31
commit 2d5822dfa6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 2 deletions

View File

@ -18,7 +18,7 @@ import { partialRight, when } from './utils';
import withDroppable from './withDroppable'; import withDroppable from './withDroppable';
const Columns = forwardRef((props, ref: any) => ( const Columns = forwardRef((props, ref: any) => (
<div ref={ref} style={{ whiteSpace: 'nowrap', height: '100%', overflowY: 'hidden' }} {...props} /> <div ref={ref} style={{ whiteSpace: 'nowrap', height: '100%', overflowY: 'clip' }} {...props} />
)); ));
const DroppableBoard = withDroppable(Columns); const DroppableBoard = withDroppable(Columns);

View File

@ -1,5 +1,6 @@
import { ArrayField } from '@formily/core'; import { ArrayField } from '@formily/core';
import { observer, RecursionField, useField, useFieldSchema, useForm } from '@formily/react'; import { observer, RecursionField, useField, useFieldSchema, useForm } from '@formily/react';
import { css } from '@emotion/css'
import { Spin, Tag } from 'antd'; import { Spin, Tag } from 'antd';
import React, { useContext, useMemo, useState } from 'react'; import React, { useContext, useMemo, useState } from 'react';
import { SchemaComponentOptions } from '../..'; import { SchemaComponentOptions } from '../..';
@ -85,8 +86,14 @@ export const Kanban: any = observer((props: any) => {
const updatedBoard = Board.moveCard({ columns: field.value }, fromColumn, toColumn); const updatedBoard = Board.moveCard({ columns: field.value }, fromColumn, toColumn);
field.value = updatedBoard.columns; field.value = updatedBoard.columns;
}; };
return ( return (
<Spin spinning={field.loading || false}> <Spin wrapperClassName={css`
overflow: hidden;
> .ant-spin-container {
height: 100%;
}
`} spinning={field.loading || false}>
<Board <Board
{...restProps} {...restProps}
allowAddCard={!!schemas.cardAdder} allowAddCard={!!schemas.cardAdder}