(state: ListState<T>, itemKey: Key)
| 37 | } |
| 38 | |
| 39 | export function getItemId<T>(state: ListState<T>, itemKey: Key): string { |
| 40 | let data = listData.get(state); |
| 41 | |
| 42 | if (!data) { |
| 43 | throw new Error('Unknown list'); |
| 44 | } |
| 45 | |
| 46 | return `${data.id}-option-${normalizeKey(itemKey)}`; |
| 47 | } |
no test coverage detected