Skip to content

Not able to fetch the mention data on submit !! #191

Description

@akum001

#First i am calling getMentions

$('textarea.mention').mentionsInput('getMentions', function(data) {
var temp = JSON.stringify(data);
console.log(temp)
});

#Then it's coming here!

getMentions : function (callback) {
debugger;
if (!_.isFunction(callback)) {
return;
}
callback.call(this, mentionsCollection);
}

#Then here!

return this.each(function () {
var instance = $.data(this, 'mentionsInput') || $.data(this, 'mentionsInput', new MentionsInput(settings));

        if (_.isFunction(instance[method])) {
            return instance[method].apply(this, Array.prototype.slice.call(outerArguments, 1));
        } else if (typeof method === 'object' || !method) {
            return instance.init.call(this, this);
        } else {
            $.error('Method ' + method + ' does not exist');
        }
    });

Screenshot from 2019-08-17 00-20-54
Screenshot from 2019-08-17 00-23-44
Screenshot from 2019-08-17 00-28-02

It should take only current textarea object but don't understand from where it's fetching these many textareas.

it should return just first obj mentionsCollection but it returning so many empty arrays after that.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions