fix(FixedBlock): avoid kanban triggering programmatic scrolling (#1406)
* fix(FixedBlock): avoid kanban triggering programmatic scrolling * fix: kanban
This commit is contained in:
parent
0a25426f31
commit
2d5822dfa6
@ -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);
|
||||||
|
@ -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}
|
||||||
|
Loading…
Reference in New Issue
Block a user