fix: calendar-layout draggable wrapper condition (#3984)

This commit is contained in:
Lakhan Baheti 2024-03-18 19:35:17 +05:30 committed by GitHub
parent 2dbea54d2a
commit 568701881e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 5 deletions

View File

@ -174,6 +174,7 @@ export const CalendarChart: React.FC<Props> = observer((props) => {
viewId={viewId}
readOnly={readOnly}
isDragDisabled
isMobileView
/>
</div>
</div>

View File

@ -7,7 +7,6 @@ import { CalendarQuickAddIssueForm, CalendarIssueBlockRoot } from "components/is
import { renderFormattedPayloadDate } from "helpers/date-time.helper";
// types
import { TIssue, TIssueMap } from "@plane/types";
import useSize from "hooks/use-window-size";
type Props = {
date: Date;
@ -26,6 +25,7 @@ type Props = {
addIssuesToView?: (issueIds: string[]) => Promise<any>;
viewId?: string;
readOnly?: boolean;
isMobileView?: boolean;
};
export const CalendarIssueBlocks: React.FC<Props> = observer((props) => {
@ -41,11 +41,10 @@ export const CalendarIssueBlocks: React.FC<Props> = observer((props) => {
addIssuesToView,
viewId,
readOnly,
isMobileView = false,
} = props;
// states
const [showAllIssues, setShowAllIssues] = useState(false);
// hooks
const [windowWidth] = useSize();
const formattedDatePayload = renderFormattedPayloadDate(date);
const totalIssues = issueIdList?.length ?? 0;
@ -54,8 +53,8 @@ export const CalendarIssueBlocks: React.FC<Props> = observer((props) => {
return (
<>
{issueIdList?.slice(0, showAllIssues || windowWidth <= 768 ? issueIdList.length : 4).map((issueId, index) =>
windowWidth > 768 ? (
{issueIdList?.slice(0, showAllIssues || isMobileView ? issueIdList.length : 4).map((issueId, index) =>
!isMobileView ? (
<Draggable key={issueId} draggableId={issueId} index={index} isDragDisabled={isDragDisabled}>
{(provided, snapshot) => (
<div