Skip to content

How to send some date to the runInlineMenu callback? #195

@dangear

Description

@dangear

Have generate inlineMenu from some json-array. Code:

var sectionTitles=[];
var layoutList=[];
for(data in someArray){
     sectionTitles.push({
          text: data,
          callback: (mes) => {
               console.log(data)
          }
     })
     layoutList.push('1');
}	
tg.runInlineMenu(tgUser, 'sendMessage', 'Press some button:', {}, sectionTitles, layoutList)

Buttons name from JSON-array put correctly. But in console.log show me "undefined".
How I can send data from JSON-array in runInlineMenu callback?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions