(e: MouseEvent)
| 39 | const isKnownValue = options.some(option => option.value === value) |
| 40 | const items: DesignSystemSelectOption[] = options.length > 0 |
| 41 | ? options.map(option => ({ ...option, value: option.value === "" ? EMPTY_VALUE : option.value })) |
| 42 | : [{ value: NO_OPTIONS_VALUE, label: t("No options"), disabled: true }] |
| 43 | |
| 44 | return ( |
| 45 | <DesignSystemSelect |
| 46 | options={items} |
| 47 | // 值不在选项里时传空串,Radix 显示占位文字(与原来一致) |
| 48 | value={isKnownValue ? (value === "" ? EMPTY_VALUE : value) : ""} |
nothing calls this directly
no outgoing calls
no test coverage detected