Merge pull request #1371 from kchadha/modal-by-vartype
Use variable type information in variable prompts to show/hide 'more options'
This commit is contained in:
1 file changed
+5
-3
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user