fix(cascader): cascader dropdown placement using isRtl (#40109)

* fix(cascader): cascader dropdown placement using isRtl

* fix(cascader): remove extra SelectCommonPlacement type assertion

Co-authored-by: Ehsan Khakian <e.khakian@liateam.net>
This commit is contained in:
3hson 2023-01-09 15:05:14 +03:30 committed by GitHub
parent e23c5a4f9d
commit ea943f7e70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -272,9 +272,7 @@ const Cascader = React.forwardRef((props: CascaderProps<any>, ref: React.Ref<Cas
if (placement !== undefined) {
return placement;
}
return direction === 'rtl'
? ('bottomRight' as SelectCommonPlacement)
: ('bottomLeft' as SelectCommonPlacement);
return isRtl ? 'bottomRight' : 'bottomLeft';
};
// ==================== Render =====================