Commit 4c99a2e
authored
Update order-search-filter.lua
Motivation
Prevent deleted work orders from being reinserted into the filtered snapshot while a search filter is active, which could lead to UI actions on stale entries and crashes.
Description
Track the IDs of the last filtered set in self.last_filtered_ids and compute the current live orders IDs each filter application.
When previously-visible orders are missing from the live list, prune those IDs out of self.unfiltered_orders so deleted orders are not re-added.
Reset self.last_filtered_ids when restoring the full, unfiltered list in restore_orders.1 parent d47070b commit 4c99a2e
1 file changed
Lines changed: 26 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
| 172 | + | |
172 | 173 | | |
173 | 174 | | |
174 | 175 | | |
| |||
180 | 181 | | |
181 | 182 | | |
182 | 183 | | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
183 | 205 | | |
184 | 206 | | |
185 | 207 | | |
186 | 208 | | |
187 | 209 | | |
188 | 210 | | |
189 | 211 | | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
190 | 216 | | |
191 | 217 | | |
192 | 218 | | |
| |||
0 commit comments