Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@tntd/tooltip-select

Package Overview
Dependencies
Maintainers
13
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tntd/tooltip-select

# @tntd/ant3-virtual-select

latest
npmnpm
Version
4.4.7
Version published
Maintainers
13
Created
Source

4.x版本基于tntd2.x

@tntd/ant3-virtual-select

基于 ant3 实现带悬浮显示的下拉列表

安装

npm i @tntd/tooltip-select

用法

所有 API 同 ant3 Select

props 参数:

参数类型默认值是否必填说明
setTitlefunction(e)非必填自定义 tooltip 的 title 节点
isVirtualBooleanfalse非必填列表是否采用虚拟滚动
placementStringtop非必填tooltip位置
isMemoBooleanfalse非必填列表是否采用监听值及children控制渲染

示例

import { useState } from "react";
import TooltipSelect from "@tntd/tooltip-select";
import { Select, Tooltip } from "antd";
const Option = Select.Option;

export default (props) => {
  const [title, setTitle] = useState();
  const aTitle = (title) => {
    return <a>{title}</a>;
  };
  return (
    <TooltipSelect
      setTitle={(value) => {
        return aTitle(value);
      }}
      placeholder="66"
      value={title}
      onChange={(value) => {
        setTitle(value);
      }}
      dropdownMatchSelectWidth={false}
    >
      <Option value={1}>1+1</Option>
      <Option value={2}>2+2</Option>
    </TooltipSelect>
  );
};

FAQs

Package last updated on 20 May 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts