fix(Tree): fix tree drop indicator default direction (#28150)

This commit is contained in:
Jingsong Gao 2020-12-02 22:12:32 +08:00 committed by GitHub
parent ca5b47f674
commit 706ec5cdb1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,7 +9,7 @@ export default function dropIndicatorRender(props: {
prefixCls: string;
direction: 'ltr' | 'rtl';
}) {
const { dropPosition, dropLevelOffset, prefixCls, indent, direction } = props;
const { dropPosition, dropLevelOffset, prefixCls, indent, direction = 'ltr' } = props;
const startPosition = direction === 'ltr' ? 'left' : 'right';
const endPosition = direction === 'ltr' ? 'right' : 'left';
const style: React.CSSProperties = {