SI: highlight rule selections
Merge request reports
Activity
@svornost i HATE what I did to
App.UI.SlaveInteract.generateRows
with this. Is there a better way you can think of? Maybe I should just make new system just for this page.I'd consider composing it into a different function.
For example: imagine a function whose only responsibility was to look at a single
RowItem
and, if it was not already disabled, but was already active, set thedisabled
property appropriately. That function would have just one job, andgenerateRows
would not be responsible for that job anymore...the existing code to handledisabled
would be enough.Then, you could assemble that into a loop that runs through an entire array of RowItems, applying that function to them each, and then instead of calling
generateRows(array, ...
you could callgenerateRows(disableSelected(array), ...
, if you wanted the selected items disabled.
mentioned in commit 0aaa1189