Skip to content

Commit

Permalink
docs(tree-select): update api docs
Browse files Browse the repository at this point in the history
  • Loading branch information
epoll-j committed Sep 18, 2024
1 parent 2d1ebcd commit b77c4bd
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 17 deletions.
7 changes: 1 addition & 6 deletions src/tree-select/defaultProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,4 @@

import { TdTreeSelectProps } from './type';

export const treeSelectDefaultProps: TdTreeSelectProps = {
filterable: false,
height: 336,
multiple: false,
options: [],
};
export const treeSelectDefaultProps: TdTreeSelectProps = { height: 336, multiple: false, options: [] };
1 change: 0 additions & 1 deletion src/tree-select/tree-select.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ name | type | default | description | required
-- | -- | -- | -- | --
className | String | - | className of component | N
style | Object | - | CSS(Cascading Style Sheets),Typescript:`React.CSSProperties` | N
filterable | Boolean | false | \- | N
height | String / Number | 336 | \- | N
keys | Object | - | alias filed name in data。Typescript:`TreeKeysType`[see more ts definition](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts) | N
multiple | Boolean | false | \- | N
Expand Down
1 change: 0 additions & 1 deletion src/tree-select/tree-select.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
-- | -- | -- | -- | --
className | String | - | 类名 | N
style | Object | - | 样式,TS 类型:`React.CSSProperties` | N
filterable | Boolean | false | 是否可搜索 | N
height | String / Number | 336 | 高度,默认单位为 px | N
keys | Object | - | 用来定义 `value / label / disabled / children``data` 数据中对应的字段别名,示例:`{ value: 'key', label: 'name', children: 'list' }`。TS 类型:`TreeKeysType`[通用类型定义](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts) | N
multiple | Boolean | false | 是否允许多选 | N
Expand Down
7 changes: 3 additions & 4 deletions src/tree-select/tree-select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,16 +128,15 @@ const TreeSelect: FC<TreeSelectProps> = (props) => {
{treeOption.map((item) => (
<Checkbox
key={item.value}
class={`${treeSelectClass}__checkbox-item`}
className={`${treeSelectClass}__checkbox-item`}
value={item.value}
maxLabelRow={1}
icon="line"
borderless
placement="right"
disabled={item.disabled}
>
{item.label}
</Checkbox>
label={item.label}
/>
))}
</Checkbox.Group>
);
Expand Down
5 changes: 0 additions & 5 deletions src/tree-select/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@
import { TreeOptionData, TreeKeysType } from '../common';

export interface TdTreeSelectProps<DataOption extends TreeOptionData = TreeOptionData> {
/**
* 是否可搜索
* @default false
*/
filterable?: boolean;
/**
* 高度,默认单位为 px
* @default 336
Expand Down

0 comments on commit b77c4bd

Please sign in to comment.