Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
github-actions bot opened this issue May 6, 2023 · 0 comments
Labels

Comments

@github-actions
Copy link

github-actions bot commented May 6, 2023

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>
}
@github-actions github-actions bot added the todo label May 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

0 participants