mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
fix: calendar-layout draggable wrapper condition (#3984)
This commit is contained in:
parent
2dbea54d2a
commit
568701881e
@ -174,6 +174,7 @@ export const CalendarChart: React.FC<Props> = observer((props) => {
|
||||
viewId={viewId}
|
||||
readOnly={readOnly}
|
||||
isDragDisabled
|
||||
isMobileView
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user