Function
findEnabledStep
(
key: Key | null,
disabledKeys: Set<Key>,
getNextKey: (key: Key) => Key | null
)
Source from the content-addressed store, hash-verified
| 355 | // The closest step to the given one, including itself, in the direction of getNextKey that isn't in |
| 356 | // disabledKeys. |
| 357 | function findEnabledStep( |
| 358 | key: Key | null, |
| 359 | disabledKeys: Set<Key>, |
| 360 | getNextKey: (key: Key) => Key | null |
| 361 | ): Key | null { |
| 362 | while (key != null && disabledKeys.has(key)) { |
| 363 | key = getNextKey(key); |
| 364 | } |
| 365 | return key; |
| 366 | } |
| 367 | |
| 368 | // The position of a step within the wizard, or -1 if the key isn't one of its steps. |
| 369 | function getStepIndex<T>(collection: ICollection<Node<T>>, key: Key | null): number { |
Tested by
no test coverage detected