Comments (9)
tagRender 是有返回 onClose 属性的,可以直接用
大哥,onXXX 都是事件回调
tagRender={({ onClose }) => <Tag onClose={onClose} />}
from ant-design.
迭代
这个指的是什么?不好意思,我不太明白说的是啥。。。
from ant-design.
抱歉,我意思是labelRender的api设计应该和maxTagPlaceholder类似才对吧(多选模式下),label应该指整体,而不是单个tag,现在提供的labelRender 相当于map的迭代器 { values.map(value => labelRender(value )) }
其实我感觉应该是这样的{ labelRender(values) }
我考虑先使用maxTagCount=0 然后使用maxTagPlaceholder来实现吧
from ant-design.
What does the proposed API look like?
完整的 API 描述一下。
from ant-design.
What does the proposed API look like?
完整的 API 描述一下。
后来我想到maxTagCount + maxTagPlaceholder 也能实现,就先这样吧
from ant-design.
但其实还有一些别的问题是
我感觉 labelRender的api应该是
labelRender -> (option: OptionType | OptionType[], defaultDom: ReactElement| ReactElement[]) => ReactElement
然后tagRender应该把action remove 做参数也返回,不然需要自己去做受控,实际使用有点麻烦
tagRender -> (props: CustomTagProps, index, remove) => ReactElement
from ant-design.
tagRender 是有返回 onClose 属性的,可以直接用
from ant-design.
tagRender 是有返回 onClose 属性的,可以直接用
大哥,onXXX 都是事件回调
from ant-design.
看起来都是可以通过代码实现的功能,没其他问题先关闭了
from ant-design.
Related Issues (20)
- Form中,Checkbox.Group options支持虚拟列表 HOT 5
- Tabs do not work properly if the tab key contains a backslash HOT 1
- Paragraph copyable支持修改tabindex HOT 2
- Tooltip 嵌套 Select使用 严格模式下报错:Warning: findDOMNode is deprecated in StrictMode. HOT 2
- [email protected] is an empty package in npmjs HOT 6
- menu组件主题色的itemActiveBg配置不生效 HOT 1
- ColorPicker被Form.Item包裹,value不生效
- Tooltip not working on mobile devices HOT 1
- The filter in a table does not clear its state when closed when use filterOnClose - false HOT 1
- Datepick.RangePicker picker="month", set disabledDate, can't select first month to last month HOT 3
- want to placeholder to be showed permanent , don't want to show selected items in treeselect bar HOT 2
- Badge 数字没有居中 HOT 2
- DatePicker.RangePicker 的 disabledTime 属性。 结束时间小于等于开始时间的部分都需要禁用(小时 分钟 秒) HOT 2
- Form.Item在Modal中使用,设置help,marginBottom问题 HOT 8
- ant design website mobile view menu overlapping issue HOT 1
- DatePicker在上下空间都不够的情况下无法展现全部 HOT 5
- 每行有200 列,但是没有触发横向虚拟滚动,使用的是官网demo HOT 9
- Carousel 设置了initialSlide后的位置问题 HOT 5
- Blinking Notification prompt when using "App" wrapper HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ant-design.