0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-02 12:52:38 +00:00

Add params from snippet to function

This commit is contained in:
G.Ambatte
2023-06-03 14:09:50 +12:00
parent d2b2e69123
commit 9093f610bd
3 changed files with 57 additions and 17 deletions

View File

@@ -167,7 +167,7 @@ const SnippetGroup = createClass({
},
handleSnippetClick : function(e, snippet){
e.stopPropagation();
this.props.onSnippetClick(execute(snippet.gen, this.props.brew, { cursorPos: this.props.cursorPos }));
this.props.onSnippetClick(execute(snippet.gen, this.props.brew, { ...snippet.params, cursorPos: this.props.cursorPos }));
},
renderSnippets : function(snippets){
return _.map(snippets, (snippet)=>{