Skip to content

Remove all instances of this getSetItems interface and replace it with just setI... #75

@github-actions

Description

@github-actions

https://api.github.com/acenturyandabit/workflowish/blob/d9dac81df2e15a1b543aaf24406286b3278b7042/src/Workflowish/index.tsx#L158

                },
                disableDelete: () => (itemTree.children.length == 1),
                getSetItems: (keys: string[], getSetter: TreeNodesGetSetter) => {
                    props.transformedDataAndSetter.setItemsByKey((oldData: TransformedData) => {
                        // TODO: Remove all instances of this getSetItems interface and replace it with just setItemsByKey
                        const oldItems = keys.map(key => oldData.keyedNodes[key])
                        const newNodes = getSetter(oldItems);
                        return newNodes.reduce((nodeDict, node) => {
                            nodeDict[node.id] = node;
                            return nodeDict;
                        }, {} as Record<string, ItemTreeNode>);
                    });
                },
                thisItem: itemTree
            })}
        ></Item >)
    })}</RenderTimeContext.Provider>
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions