hullis on feat-angular-v14
hullis on master
release(module:angular): releas… (compare)
hullis on feat-angular-v14
release(module:angular): releas… (compare)
dependabot[bot] on npm_and_yarn
Bump terser from 4.8.0 to 4.8.1… (compare)
I'm thinking which state management library to use in a new UMI project: DVA or Redux.
You might have some thoughts on this, or just find this info useful.
What's the connection with antd?
Antd uses UMI and DVA.
DVA
PROS (DVA is good because:)
There is a Chinese community behind it (I live in China), they have tutorials and groups for questions.
UMI is made for DVA, so future compatibility is granted.
Small size. Empty UMI project with DVA added is 0.5 MB.
CONS (DVA is bad because:)
Poorly documented.
Redux
PROS:
There is a much bigger English language community behind it.
Very complex, has Hooks and other features to cover special needs.
CONS:
Large size. Empty UMI project with Redux added is 2.6 MB.
Conclusion:
This is not final, but i might choose DVA because of the size. It won't be easy though, cause I don't understand the Chinese documentation and machine translation gives a poor result.
@emelerdem
Hi!
İ used filtered antd
but not working
{
title: t('columns.status'),
dataIndex: 'status',
key: 'status',
editable: true,
inputType:'status',
filters: [
{
text: 'ONLINE',
value: "ONLINE",
},
{
text: 'OFFLINE',
value: "OFFLINE",
},
],
filterMultiple: false,
onFilter: (value, record) => record.status.indexOf(value) === 0,
this is my code
Hi,
I am new to Ant-design though I have been doing some reading about it but still thinking how best to implement it with my REACT application. I am frustrated with MATERIAL-UI, just to implement Form Layout using MATERIAL-UI GRID and CONTAINER is taking me forever, my project is for 4 weeks and I have been trying this framework for 2 weeks now which is 50% of my productive working time wasted.
Please I will need anyone to bring me to SPEED, on how to implement ANT-DESIGN in my React Project so that I can meet up with the timeline.
Thank you in anticipation
Menu.SubMenu
and it Menu.Item
components in map
loop function? data = {
"Weldlog": [
{
"id": 1,
"title": "Weldlog",
"link": "/workspace/weldlog",
"icon": "MonitorOutlined",
"component": "Weldlog",
"is_root": true,
"parent": null
},
{
"id": 2,
"title": "Labs",
"link": "labs",
"icon": "MonitorOutlined",
"component": "Labs",
"is_root": false,
"parent": "Weldlog"
},
{
"id": 3,
"title": "Lab requests",
"link": "labrequest",
"icon": "FileProtectOutlined",
"component": "LabRequest",
"is_root": false,
"parent": "Weldlog"
}
]
}
render() {
const { navMenuData } = this.state;
console.log(navMenuData)
if(navMenuData === null){
return(
<Spin tip="Загружаем меню..."/>
)
} else {
return (
<div>
<Menu theme="dark" mode="horizontal" defaultSelectedKeys={this.props.activeKey} selectedKeys={this.props.activeKey}>
{
Object.entries(navMenuData).map(([menuRootItem, menuItems]) => (
<Menu.SubMenu title={menuRootItem}>
{
Object.values(menuItems).map((menuItem) => {
console.log(menuItem)
return(
<Menu.Item key={menuItem.link}>{menuItem.title}</Menu.Item>
)
})
}
</Menu.SubMenu>
))
}
<Menu.Item
key="user"
onClick={() => {this.setState({visible: true})}}
icon={Icon['UserOutlined'].render()}
style={{marginLeft: 'auto'}}
>
{`${this.state.auth.profile.first_name} ${this.state.auth.profile.second_name}`}
</Menu.Item>
</Menu>
<Drawer
width={640}
placement="right"
closable={true}
onClose={() => this.setState({visible: false})}
visible={this.state.visible}
// visible={true}
>
<UserControl/>
</Drawer>
</div>
);
}
}
So I have a table where I mark rows red if they have a status FAIL, this works nice, but now I want the hover color to have a stronger red color on the FAIL rows.
I cant find anyway to manipulate the hover color in the table.
To be clear, I want to change the hover color on the table depending on the data of the row.
<Table
dataSource={data}
rowClassName={(record, index) =>
record.status.includes("FAIL")
? "table-row-failed"
: ""
}
rowKey="reference"
columns={columns}
></Table>
Is this possible?
Hi all
Forgive me if this has been asked previously.
I am facing a css bundle size issue (12 MB)
I'm importing a lot of AntD components in my project like
import { Button } from 'antd';
...
...
In my App.less I am importing @import '~antd/dist/antd.less';
When I build my react app (created with create-react-app)
The main css chunk size is 12 MB.
I analzyed it with source-map-explorer it shows 70% of it is from colors and style