Skip to content
Snippets Groups Projects
Unverified Commit c2ab92e2 authored by kchadha's avatar kchadha Committed by GitHub
Browse files

Merge pull request #1371 from kchadha/modal-by-vartype

Use variable type information in variable prompts to show/hide 'more options'
parents 7feaab97 180a1ac5
No related branches found
No related tags found
No related merge requests found
......@@ -235,10 +235,12 @@ class Blocks extends React.Component {
setBlocks (blocks) {
this.blocks = blocks;
}
handlePromptStart (message, defaultValue, callback, optTitle) {
handlePromptStart (message, defaultValue, callback, optTitle, optVarType) {
const p = {prompt: {callback, message, defaultValue}};
p.prompt.title = optTitle ? optTitle : 'New Variable';
p.prompt.showMoreOptions = optTitle !== 'New Message';
p.prompt.title = optTitle ? optTitle :
this.ScratchBlocks.VARIABLE_MODAL_TITLE;
p.prompt.showMoreOptions =
optVarType !== this.ScratchBlocks.BROADCAST_MESSAGE_VARIABLE_TYPE;
this.setState(p);
}
handlePromptCallback (data) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment