# SSelect

> 자동 생성 문서 — `npm run docs:gen`. 소스: 각 컴포넌트의 Props/Handle 인터페이스 + import 의존성.

### SSelect

#### Props

| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `value?` | `(string \| number \| SSelectOption) \| (string \| number \| SSelectOption)[] \| null` | — | 선택 값. multi 타입이면 배열. emitValue=false(기본) 라운드트립을 위해 SSelectOption 객체도 허용 |
| `emitValue?` | `boolean` | `false` | true면 SSelectOption 대신 원시값(string|number) 방출 |
| `name?` | `string` | — | 폼 연동용 name 속성 |
| `options?` | `SSelectOption[]` | `[]` | 옵션 목록 (children으로 계층 표현) |
| `type?` | `SSelectType` | `'default'` | 타입: default | multi | default_depth | multi_depth |
| `useSearch?` | `boolean` | `false` | 검색 입력 사용 |
| `useSelectAll?` | `boolean` | `false` | 전체선택 옵션 사용 (multi 전용) |
| `allSelectedLabel?` | `string` | `'전체'` | 전체선택 레이블 |
| `placeholder?` | `string` | `'선택'` | placeholder |
| `disabled?` | `boolean` | `false` | 비활성 |
| `error?` | `boolean` | `false` | 에러 상태 |
| `rules?` | `Rule[]` | — | 유효성 규칙 — 닫힐 때 자동 검증 |
| `labelTooltipProps?` | `Partial<STooltipProps>` | — | 레이블 툴팁 상세 옵션 |
| `dropdownHeight?` | `string` | `'260px'` | 드롭다운 최대 높이 |
| `dropdownWidth?` | `string` | — | 드롭다운 너비 (없으면 트리거 너비) |
| `maxDropdownWidth?` | `string` | `'640px'` | 드롭다운 최대 너비 |
| `label?` | `string` | — |  |
| `labelWidth?` | `number \| string` | — |  |
| `icon?` | `SIconName` | — | 레이블 영역 아이콘 |
| `iconColor?` | `SColor` | — |  |
| `labelTooltip?` | `string` | — | 레이블 툴팁 텍스트 |
| `addonLabel?` | `string` | — | 우측 어드온 레이블 |
| `addonAlign?` | `SFieldAddonAlign` | — | 어드온 정렬 |
| `hint?` | `string` | — |  |
| `errorMessage?` | `string` | — |  |
| `width?` | `number \| string` | — |  |
| `className?` | `string` | — |  |
| `style?` | `CSSProperties` | — |  |

#### Events

| Event | Type | Description |
|-------|------|-------------|
| `onValueChange` | `(value: any) => void` | 값 변경 (sdUpdate). emitValue=false(기본)면 SSelectOption(들), true면 원시값 |
| `onOpenChange` | `(open: boolean) => void` | 열림/닫힘 변경 (sdDropDownShow) |

#### Methods (ref)

| Method | Type | Description |
|--------|------|-------------|
| `focus` | `() => void` | 트리거 버튼에 포커스 (sdFocus) |
| `open` | `() => void` | 드롭다운 열기 (sdOpen) |

## Dependencies

### Used by

 - [SKeyValueTable](../SKeyValueTable)
 - [STable](../STable)

### Depends on

- [SField](../SField)
- [SGhostButton](../SGhostButton)
- [SIcon](../SIcon)
- [SPortal](../SPortal)

### Graph

```mermaid
graph TD;
  SSelect --> SField
  SSelect --> SGhostButton
  SSelect --> SIcon
  SSelect --> SPortal
  SKeyValueTable --> SSelect
  STable --> SSelect
  style SSelect fill:#f9f,stroke:#333,stroke-width:4px
```
