Add a sidebar menu item will get Network Error
fredalai opened this issue · comments
Describe the bug
Add a sidebar menu item will be failed
To Reproduce
Steps to reproduce the behavior:
-
Use CLI tool to build blog type CMS
-
Add a sidebar menu item for the canner.server.js file
sidebarMenu: [{
title: "Posts",
pathname: "posts",
icon: "read"
}, {
title: "Categories",
pathname: "categories",
icon: "tag"
},{
title: "OtherMenuItem",
pathname: "otherMenuItem",
}],
- Add "otherMenuItem.schema.js" file into the schema folder
E.g.,
import CannerScript, { Tabs } from "canner-script";
const columns = [
{
dataIndex: "title",
key: "title",
title: "Title",
}
];
export default ({ attributes }) => (
<array
dataSource={attributes.dataSource}
keyName="OtherMenuItem"
title="otherMenuItem"
ui="tableRoute"
uiParams={{columns}}
>
<toolbar>
<pagination />
</toolbar>
<Tabs>
<string
keyName="title"
title="title"
required
layout="horizontal"
/>
</Tabs>
</array>
);
- Include and use otherMenuItem.schema.js for the canner.schema.js
- Run CLI command: canner start
- Go to http://localhost:3000/cms/othermenuitem page
- See error
Expected behavior
Dependencies (please complete the following information):
- OS: MacOS 10.14.4
- Browser: Chrome 74.0.3729.131
- Node Version: v10.15.3
- Canner Version: 3.2.13
Additional context
if pathname and keyName are "othermenuitem" will be executed successfully.