-
-
Notifications
You must be signed in to change notification settings - Fork 49k
FAQ
Search in the questions about React first: https://reactfaq.site
No, but the LICENSE of ant-design is MIT. So, you can try to implement it with ant-design's style. See: vue-antd.
No, actually, you can convert Less to Sass/Stylus(etc...) with tools (which you can Google).
No, actually, CoffeeScript(etc...) works fine with JavaScript library.
See: https://github.com/ant-design/ant-design/issues/4491
Select Dropdown DatePicker TimePicker Popover Popconfirm
will disappear when I click another popup component inside it, How to resolve it?
Use <Select getPopupContainer={trigger => trigger.parentNode}>
to render component inside Popover. (Or other getXxxxContainer props)
https://ant.design/components/select/#Select-props
Use <Select getPopupContianer={trigger => trigger.parentNode}>
to render component inside the scroll area. (Or other getXxxxContainer props)
https://ant.design/components/select/#Select-props
See: https://ant.design/docs/react/customize-theme .
No, we follow Ant Design specification. https://github.com/ant-design/ant-design/issues/1241
You can override its style. But we don't recommend to do so. ant-design is not only a set of React components, but also a design specification.
I just want to use Menu
/Button
(etc...), but it seems that I have to import the whole antd and its style.
Try babel-plugin-import, or import what you need in this way:
import Menu from 'antd/lib/menu';
import 'antd/lib/button/style/css';
or (ES6 way):
import { Menu, Breadcrumb, Icon } from 'antd';
See: https://github.com/jmblog/how-to-optimize-momentjs-with-webpack
The defaultXxxx
(like defaultValue
) of Input
/Select
(etc...) only works in first render. It is a specification of React, please read React's documentation.
Try defaultValue
or onChange
to change value
, and please read React's documentation.
Yes, antd is designed to develop a complete background application, we override some global styles for styling convenience and it can't be removed now. More info trace https://github.com/ant-design/ant-design/issues/5851 .
Long live the Girl Friend Wall! And try cnpm.
Yes, please install antd
with npm. If you want to install the latest version, try npm install antd@beta
.
No, as message
is just a function, not a React Component.
Yes, and we have no plan & time to officially support it now.
Also, we fixed lots of issues about server rendering reported by community after 1.x and we will continue to do this.
https://github.com/ant-design/ant-design/issues/215#issuecomment-203791164
We support it after antd@2.0.0
!
Please check And Design Mobile for details. antd
has not been optimized to do so. You may try react-component, those repositories which start with 'm-' 'rn-' are designed for mobile.
Yep, you can import antd
with script tag. But we recommend use npm
to import antd
, it is simple and ease to maintain.
You should deploy the iconfont files to your network by following this example. #1070
If you need some features which should not be included in antd, try to extend antd's component with HOC. more
No yet.
Alibaba will pay us.
Here are some errors & warnings that you may meet while using antd, but most of them are not bugs of antd.
An answer from StackOverflow, and please read React's documentation.
React.createElement: type should not be null, undefined, boolean, or number. It should be a string (for DOM elements) or a ReactClass (for composite components)
Please make sure that you import antd
's components correctly. Read the corresponding documentation of the antd
's version which you use. And pay attention to typo.
Please read this issue, or try Linux/Unix.
Failed propType: Invalid prop AAA
of type BBB
supplied to CCC
, expected DDD
. Check the render method of EEE
.
Please read the corresponding documentation of the antd
's version which you use, and make sure that you pass value with correct type to antd
's components,
An answer from Stack Overflow.
You may import React twice. Set React & ReactDOM as external, if you are using webpack, See: #525. If you are using others(browserify, etc...), please read its documentation and find options which can set React & ReactDOM as external.
- Home
- Cookbook
- FAQ
- Template for Bug Report in IE8 9
- Contributing
- Maintaining
- Design