amis-rpc-design/node_modules/antd/lib/select/useShowArrow.js

15 lines
414 B
JavaScript
Raw Normal View History

2023-10-07 19:42:30 +08:00
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = useShowArrow;
/**
* Since Select, TreeSelect, Cascader is same Select like component.
* We just use same hook to handle this logic.
*
* If `suffixIcon` is not equal to `null`, always show it.
*/
function useShowArrow(suffixIcon, showArrow) {
return showArrow !== undefined ? showArrow : suffixIcon !== null;
}