Skip to content

Commit

Permalink
Fix NamesCell reload after deleting item (redwoodjs#519)
Browse files Browse the repository at this point in the history
Use pluralCamelName in place of hardcoded string when performing refetchQuery in delete handler
  • Loading branch information
cephalization authored and Justin Reidy committed May 30, 2020
1 parent 24d8e05 commit 08d3666
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -32,7 +32,7 @@ const ${pluralPascalName}List = ({ ${pluralCamelName} }) => {

const onDeleteClick = (id) => {
if (confirm('Are you sure you want to delete ${singularCamelName} ' + id + '?')) {
delete${singularPascalName}({ variables: { id }, refetchQueries: ['POSTS'] })
delete${singularPascalName}({ variables: { id }, refetchQueries: ['${pluralConstantName}'] })
}
}

Expand Down

0 comments on commit 08d3666

Please sign in to comment.