useShowArrow.js 317 B

123456789
  1. /**
  2. * Since Select, TreeSelect, Cascader is same Select like component.
  3. * We just use same hook to handle this logic.
  4. *
  5. * If `suffixIcon` is not equal to `null`, always show it.
  6. */
  7. export default function useShowArrow(suffixIcon, showArrow) {
  8. return showArrow !== undefined ? showArrow : suffixIcon !== null;
  9. }