Comments (17)
Start a new pull request in StackBlitz Codeflow.
from ant-design.
I don't really get the problem. What is the different between expected behaviors and reality?
from ant-design.
Hello @orelHAnyvision. Please provide a online reproduction by forking codesandbox of [email protected] or [email protected], or provide a minimal GitHub repository. Issues labeled by Need Reproduce
will be closed if no activities in 3 days.
你好 @orelHAnyvision,我们需要你提供一个在线的重现实例以便于我们帮你排查问题。你可以通过点击这里创建一个 [email protected] 或 [email protected] 的 codesandbox,或者提供一个最小化的 GitHub 仓库。3 天内未跟进此 issue 将会被自动关闭。
from ant-design.
@afc163
Sorry maybe I didn't describe it well enough.
I would expect this code to render the tags and when it reach to max it will render just
<Select
{...sharedProps}
{...selectProps}
maxTagPlaceholder={(omittedValues) => <div>test</div>}
/>
what happens is that <div>test</div>
is rendered inside a Tag which I didn't define and I can't control
from ant-design.
Still confused, the screenshot is broken.
from ant-design.
you can see that what I use for maxTagPlaceholder is just <div>test</div>
and its rendered inside a tag
from ant-design.
That is a intented behaviour, what is your expectation.
from ant-design.
@afc163
My expectation would be to display what we render in maxTagPlaceholder without wrapping it with something.
The problem with the current behavior is that if I want to modify the tagRender prop and render a tag with a preferred color and I want the design to be consistent I'm not able to do it with the current implementation.
<Select
...
tagRender={(props) => (
<Tag color='red' style={{ fontSize: 12 }} bordered={false} {...props}>
{props.label}
</Tag>
)}
maxTagPlaceholder={(omittedValues) => <div>more</div>}
there is no way for me to set the 'more' with color='red'
, bordered={false}
and so
from ant-design.
So the real problem is that tagRender
is not working on the max tag in https://stackblitz.com/edit/react-hkorld-vqpmy6?file=demo.tsx , right?
Expected ✅ | Now ❌ |
---|---|
from ant-design.
The same issue: #32072
from ant-design.
@afc163
well, yes and no.
Same issue for this specific case when we want it to be just like the tagRender.
Not same because I could say that I want to render other element which is not related to the tagRender prop
from ant-design.
@afc163
btw, I didn't see any solution for it here #32072 ?
from ant-design.
Not yet
from ant-design.
@afc163
I believe that quicker solution would be just render what we use.
maxTagPlaceholder={(omittedValues) => <div>more</div>}
will just render <div>more</div>
. I guess its just condition in the source code to check whether maxTagPlaceholder provided to just render whats inside it without any wrapper.
This issue it from 2021....
from ant-design.
I believe that quicker solution would be just render what we use.
We can't simply change this, it would be a break change for existed usage.
from ant-design.
@afc163
maybe we could add it with another prop(boolean) to verify it
from ant-design.
Related Issues (20)
- Antd reset.css is not imported when using as layer HOT 3
- Collapse item content overflow inside a wrapper with defined height HOT 2
- Collapse items overflow inside a wrapper with defined height HOT 2
- Collapse item content overflow inside a wrapper with defined height HOT 3
- Disable animation for selected components HOT 1
- flex 布局下 card tabs 加载异常 HOT 6
- No ref props available in Form component HOT 1
- Modal对话框组件中是否可以提供类似Drawer抽屉组件中loading属性
- antd 5.17.0 Uncaught TypeError: layer.split is not a function HOT 3
- Upload 组件 配置 showUploadList 里的showDownLoadIcon 无法下载,鼠标为禁用手势 HOT 1
- <Card /> 组件在 small 尺寸下的卡片式页签出现多余的 border 边框 HOT 2
- Tooltip 从空字符到有值后,不会马上渲染,需要鼠标移出后再移入才显示 HOT 7
- antd5.17 Calendar/DatePicker国际化失效 HOT 3
- table 开启virtual 虚拟滚动后,表格dom由div生成,无法获取原td元素的 cellIndex HOT 6
- Typography.Title 不具备响应式应式布局 HOT 2
- Nextjs static site generation extremely slow when using Typography HOT 1
- DatePicker里面的RangePicker,选择时间区域,偶现抖动问题 HOT 2
- Ant design v5' requirements HOT 1
- In Ant Design landing page, smaller screens adds a horizontal scroll that lets users scroll outside the desired view.
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.