Reputation: 11
I was using antd TreeSelect, which has similar look as Select.
Now my question is the TreeSelect doesn't have tagRender
props documented, however the Select has it.
Now I have used tagRender
on TreeSelect anyway and it seems to work.
My question is: is this safe? can this behavior change if I don't update major version of antd?
It seems tree select is based on select anyway.
Upvotes: 1
Views: 1532
Reputation: 6087
In general almost all AntD components have more options available than they document in the component page on https://ant.design/components.
A lot of the components are just CSS skins on top of the corresponding https://github.com/react-component, and quite often it is worthwhile to read the github docs for the underlying rc-component since they usually are more complete, and using the props available on those components is supported by AntD.
For TreeSelect you are correct that it is based on Select, and in this case specifically https://github.com/react-component/select/blob/master/src/generate.tsx for tagRender
, so you should be fine using that.
Upvotes: 1