Skip to content

Commit 95dd616

Browse files
Merge pull request #2955 from telerik/remove-listview
chore: remove listview
2 parents 2e78850 + b43e432 commit 95dd616

File tree

5 files changed

+37
-62
lines changed

5 files changed

+37
-62
lines changed

examples/kendo-react-freemium/package-lock.json

Lines changed: 13 additions & 34 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/kendo-react-freemium/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"@progress/kendo-react-popup": "^9.5.0",
3232
"@progress/kendo-react-tooltip": "^9.5.0",
3333
"@progress/kendo-svg-icons": "^4.0.0",
34-
"@progress/kendo-theme-default": "^10.3.0",
34+
"@progress/kendo-theme-default": "^10.3.1",
3535
"@tailwindcss/vite": "^4.0.9",
3636
"react": "^19.0.0",
3737
"react-dom": "^19.0.0",

examples/kendo-react-freemium/src/pages/Home.tsx

Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,10 @@ import { Badge } from "@progress/kendo-react-indicators";
44
import { Checkbox } from "@progress/kendo-react-inputs";
55
import { Avatar, Card, CardBody, CardFooter, CardHeader, CardSubtitle, CardTitle } from "@progress/kendo-react-layout";
66
import { Calendar } from "@progress/kendo-react-dateinputs";
7-
import { ListView, ListViewItemWrapper } from "@progress/kendo-react-listview";
87
import { pencilIcon, plusIcon, trashIcon } from "@progress/kendo-svg-icons";
98
import { tasksData, listData, projectsData, teamsData } from "./data";
109
import { useNavigate } from "react-router-dom";
1110

12-
const ListItemRender = (props: any) => {
13-
let item = props.dataItem;
14-
return <ListViewItemWrapper className="!flex !my-2 !gap-2 !p-0.5">
15-
<Checkbox rounded="small" />
16-
<span>{item.text}</span>
17-
<div className="ml-auto shrink-0">
18-
<Button svgIcon={pencilIcon} fillMode="flat" />
19-
<Button svgIcon={trashIcon} fillMode="flat" themeColor="error" />
20-
</div>
21-
</ListViewItemWrapper>;
22-
};
23-
2411
export default function Home() {
2512
const navigate = useNavigate();
2613
const handleSeeAllProjectsClick = () => {
@@ -74,10 +61,10 @@ export default function Home() {
7461
</CardFooter>
7562
</Card>
7663
</div>
77-
<div className="col-span-1 col-span-md-8 lg:col-span-6 xl:col-span-1">
78-
<Calendar className="rounded-2xl" />
64+
<div className="col-span-2 sm:col-span-1 lg:col-span-6 xl:col-span-1">
65+
<Calendar className="rounded-2xl w-full" />
7966
</div>
80-
<div className="col-span-1 col-span-md-4 lg:col-span-2 xl:col-span-1 h-72.5 lg:h-116">
67+
<div className="col-span-2 sm:col-span-1 lg:col-span-3 xl:col-span-1 h-72.5 lg:h-116">
8168
<Card className="rounded-2xl overflow-auto max-h-72.5 lg:max-h-116">
8269
<CardHeader className="border-0">
8370
<CardTitle className="font-medium">Teams</CardTitle>
@@ -86,13 +73,13 @@ export default function Home() {
8673
{teamsData.slice(0, 4).map((team, index) => {
8774
return <Card key={'team-' + index}>
8875
<div onClick={() => navigate('/team-management')} className="cursor-pointer">
89-
<CardBody className="flex items-center">
90-
<Avatar style={{ background: team.avatarColor }}>{team.teamCode}</Avatar>
91-
<div className="hidden lg:block">
92-
<CardTitle className="m-0 font-medium">{team.teamName.replace("Team", "")}</CardTitle>
93-
<CardSubtitle className="m-0 truncate text-subtle">{team.teamMembers.length} members</CardSubtitle>
94-
</div>
95-
</CardBody>
76+
<CardBody className="flex items-center">
77+
<Avatar style={{ background: team.avatarColor }}>{team.teamCode}</Avatar>
78+
<div className="block sm:hidden lg:block">
79+
<CardTitle className="m-0 font-medium">{team.teamName.replace("Team", "")}</CardTitle>
80+
<CardSubtitle className="m-0 truncate text-subtle">{team.teamMembers.length} members</CardSubtitle>
81+
</div>
82+
</CardBody>
9683
</div>
9784
</Card>
9885
})}
@@ -102,14 +89,23 @@ export default function Home() {
10289
</CardFooter>
10390
</Card>
10491
</div>
105-
<div className="col-span-2 lg:col-span-5 xl:col-span-1 h-116">
92+
<div className="col-span-2 lg:col-span-4 xl:col-span-1 h-116">
10693
<Card className="rounded-2xl h-full">
10794
<CardHeader className="border-0 flex justify-between items-center">
10895
<CardTitle className="font-medium">To-Do List</CardTitle>
10996
<Button fillMode="flat" themeColor="primary" svgIcon={plusIcon}>Add more tasks</Button>
11097
</CardHeader>
11198
<CardBody className="h-full overflow-y-hidden">
112-
<ListView data={listData} item={ListItemRender} className="h-full overflow-y-auto"/>
99+
<div className="h-full overflow-y-auto">
100+
{listData.map((item, index) => <div className="!flex !my-2 !gap-2 !p-0.5" key={'list-item-' + index}>
101+
<Checkbox rounded="small" />
102+
<span>{item.text}</span>
103+
<div className="ml-auto shrink-0">
104+
<Button svgIcon={pencilIcon} fillMode="flat" />
105+
<Button svgIcon={trashIcon} fillMode="flat" themeColor="error" />
106+
</div>
107+
</div>)}
108+
</div>
113109
</CardBody>
114110
</Card>
115111
</div>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"root":["./src/app.tsx","./src/main.tsx","./src/components/appbarcomponent.tsx","./src/components/drawercomponent.tsx","./src/pages/home.tsx","./src/pages/projects.tsx","./src/pages/settings.tsx","./src/pages/task.tsx","./src/pages/tasks.tsx","./src/pages/team.tsx","./src/pages/teammanagement.tsx","./src/pages/data.ts","./custom.d.ts"],"version":"5.7.3"}
1+
{"root":["./src/app.tsx","./src/main.tsx","./src/components/appbarcomponent.tsx","./src/components/drawercomponent.tsx","./src/pages/home.tsx","./src/pages/newtask.tsx","./src/pages/projects.tsx","./src/pages/settings.tsx","./src/pages/task.tsx","./src/pages/tasks.tsx","./src/pages/team.tsx","./src/pages/teammanagement.tsx","./src/pages/data.ts","./custom.d.ts"],"version":"5.8.2"}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"root":["./vite.config.ts"],"version":"5.7.3"}
1+
{"root":["./vite.config.ts"],"version":"5.8.2"}

0 commit comments

Comments
 (0)