(entity: TargetEntity)
| 137 | } |
| 138 | |
| 139 | function removeItemFromIndex(entity: TargetEntity) { |
| 140 | const currentIndexList = currentItemIndexMap.get(entity); |
| 141 | |
| 142 | if (!currentIndexList) { |
| 143 | console.warn( |
| 144 | "bad state - trying to remove item from index, but item is not in any index" |
| 145 | ); |
| 146 | return; |
| 147 | } |
| 148 | |
| 149 | runInAction(() => { |
| 150 | currentIndexList.remove(entity); |
| 151 | currentItemIndexMap.delete(entity); |
| 152 | }); |
| 153 | } |
| 154 | |
| 155 | /** |
| 156 | * There are 2 ways of indexing - it depends on 'key' being used. |
no test coverage detected