Skip to content

Replace 'forEach' with 'map' if mutating original data is not the goal #2015

@silverkszlo

Description

@silverkszlo

forEach would change the column.selectionOptions objects directly (since filter doesn’t create copies). Was that the intention? If the goal is only to adjust the labels for display, maybe map could be a safer choice to avoid mutating the original data?

Originally posted by @silverkszlo in #1975 (comment)

Yeah, that's a good point. I copied this function from the existing code at

. Unrelated to inline editing so should be updated separately everywhere.

Originally posted by @enjeck in #1975 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions