Can't open modal on cellClickBind a function to Twitter Bootstrap Modal CloseDisallow Twitter Bootstrap modal window from closingBootstrap modal appearing under backgroundTwitter bootstrap modal-backdrop doesn't disappearJquery Modal Inputs Appears Before Loading DataPrevent Bootstrap Modal from disappearing when clicking outside or pressing escape?Close Bootstrap ModalDisable click outside of bootstrap modal area to close modalajax Using dynamic content in variable as a field name to get field dataHow do I get this mutator to work upon cellEdited?

Promotion comes with unexpected 24/7/365 on-call

Why doesn't Iron Man's action affect this person in Endgame?

Would a "ring language" be possible?

How do Ctrl+C and Ctrl+V work?

Why is it correct to use ~た in this sentence, even though we're talking about next week?

Does a non-singular matrix have a large minor with disjoint rows and columns and full rank?

Why did nobody know who the Lord of this region was?

SHAKE-128/256 or SHA3-256/512

FIFO data structure in pure C

AD: OU for system administrator accounts

What kind of action are dodge and disengage?

How does the Heat Metal spell interact with a follow-up Frostbite spell?

How can I safely determine the output voltage and current of a transformer?

Refer a string as a field API name

​Cuban​ ​Primes

Why is Drogon so much better in battle than Rhaegal and Viserion?

How to handle professionally if colleagues has referred his relative and asking to take easy while taking interview

How to deal with the extreme reverberation in big cathedrals when playing the pipe organs?

Canadian citizen who is presently in litigation with a US-based company

Given 0s on Assignments with suspected and dismissed cheating?

Deleting the same lines from a list

Can a person still be an Orthodox Jew and believe that the Torah contains narratives that are not scientifically correct?

Holding rent money for my friend which amounts to over $10k?

Who is frowning in the sentence "Daisy looked at Tom frowning"?



Can't open modal on cellClick


Bind a function to Twitter Bootstrap Modal CloseDisallow Twitter Bootstrap modal window from closingBootstrap modal appearing under backgroundTwitter bootstrap modal-backdrop doesn't disappearJquery Modal Inputs Appears Before Loading DataPrevent Bootstrap Modal from disappearing when clicking outside or pressing escape?Close Bootstrap ModalDisable click outside of bootstrap modal area to close modalajax Using dynamic content in variable as a field name to get field dataHow do I get this mutator to work upon cellEdited?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















I'm trying to get a modal to pop up on cellClick. I'm not getting any errors, but it's not working. The table still loads and my other functions run on cellClick, but not the modal. I'm using Vue, Tabulator, bootstrap.



<script>
var Tabulator = require('tabulator-tables')
export default
name: 'Test',
data: function ()
return
modalShow: false,
tabulator: null, // variable to hold your table
tableData: [
name: 'Billy Bob', age: '12',
name: 'Mary May', age: '1'
] // data for table to display

,
watch:
// update table if data changes
tableData:
handler: function (newData)
this.tabulator.replaceData(newData)
,
deep: true

,
created: function ()
console.log('Test', this.$refs)
,
mounted ()
// instantiate Tabulator when element is mounted
this.tabulator = new Tabulator(this.$refs.table,
data: this.tableData, // link data to table
layout: 'fitColumns',
columns: [
title: 'Name', field: 'name', sorter: 'string', width: 200,
title: 'Age', field: 'age', sorter: 'number', align: 'right', formatter: 'progress'
],
cellClick: function (e, cell)
var name = cell.getRow().getCell('name').getValue()
var value = cell.getValue()
var field = cell.getField()
console.log(name, value, field)
return
modalShow: true


)


</script>

<template>
<div ref="table">
<b-modal v-model="modalShow">Test</b-modal>
</div>
</template>









share|improve this question

















  • 1





    Try this. change return modalShow: true to this.modalShow = true

    – dagalti
    Mar 23 at 16:25

















0















I'm trying to get a modal to pop up on cellClick. I'm not getting any errors, but it's not working. The table still loads and my other functions run on cellClick, but not the modal. I'm using Vue, Tabulator, bootstrap.



<script>
var Tabulator = require('tabulator-tables')
export default
name: 'Test',
data: function ()
return
modalShow: false,
tabulator: null, // variable to hold your table
tableData: [
name: 'Billy Bob', age: '12',
name: 'Mary May', age: '1'
] // data for table to display

,
watch:
// update table if data changes
tableData:
handler: function (newData)
this.tabulator.replaceData(newData)
,
deep: true

,
created: function ()
console.log('Test', this.$refs)
,
mounted ()
// instantiate Tabulator when element is mounted
this.tabulator = new Tabulator(this.$refs.table,
data: this.tableData, // link data to table
layout: 'fitColumns',
columns: [
title: 'Name', field: 'name', sorter: 'string', width: 200,
title: 'Age', field: 'age', sorter: 'number', align: 'right', formatter: 'progress'
],
cellClick: function (e, cell)
var name = cell.getRow().getCell('name').getValue()
var value = cell.getValue()
var field = cell.getField()
console.log(name, value, field)
return
modalShow: true


)


</script>

<template>
<div ref="table">
<b-modal v-model="modalShow">Test</b-modal>
</div>
</template>









share|improve this question

















  • 1





    Try this. change return modalShow: true to this.modalShow = true

    – dagalti
    Mar 23 at 16:25













0












0








0








I'm trying to get a modal to pop up on cellClick. I'm not getting any errors, but it's not working. The table still loads and my other functions run on cellClick, but not the modal. I'm using Vue, Tabulator, bootstrap.



<script>
var Tabulator = require('tabulator-tables')
export default
name: 'Test',
data: function ()
return
modalShow: false,
tabulator: null, // variable to hold your table
tableData: [
name: 'Billy Bob', age: '12',
name: 'Mary May', age: '1'
] // data for table to display

,
watch:
// update table if data changes
tableData:
handler: function (newData)
this.tabulator.replaceData(newData)
,
deep: true

,
created: function ()
console.log('Test', this.$refs)
,
mounted ()
// instantiate Tabulator when element is mounted
this.tabulator = new Tabulator(this.$refs.table,
data: this.tableData, // link data to table
layout: 'fitColumns',
columns: [
title: 'Name', field: 'name', sorter: 'string', width: 200,
title: 'Age', field: 'age', sorter: 'number', align: 'right', formatter: 'progress'
],
cellClick: function (e, cell)
var name = cell.getRow().getCell('name').getValue()
var value = cell.getValue()
var field = cell.getField()
console.log(name, value, field)
return
modalShow: true


)


</script>

<template>
<div ref="table">
<b-modal v-model="modalShow">Test</b-modal>
</div>
</template>









share|improve this question














I'm trying to get a modal to pop up on cellClick. I'm not getting any errors, but it's not working. The table still loads and my other functions run on cellClick, but not the modal. I'm using Vue, Tabulator, bootstrap.



<script>
var Tabulator = require('tabulator-tables')
export default
name: 'Test',
data: function ()
return
modalShow: false,
tabulator: null, // variable to hold your table
tableData: [
name: 'Billy Bob', age: '12',
name: 'Mary May', age: '1'
] // data for table to display

,
watch:
// update table if data changes
tableData:
handler: function (newData)
this.tabulator.replaceData(newData)
,
deep: true

,
created: function ()
console.log('Test', this.$refs)
,
mounted ()
// instantiate Tabulator when element is mounted
this.tabulator = new Tabulator(this.$refs.table,
data: this.tableData, // link data to table
layout: 'fitColumns',
columns: [
title: 'Name', field: 'name', sorter: 'string', width: 200,
title: 'Age', field: 'age', sorter: 'number', align: 'right', formatter: 'progress'
],
cellClick: function (e, cell)
var name = cell.getRow().getCell('name').getValue()
var value = cell.getValue()
var field = cell.getField()
console.log(name, value, field)
return
modalShow: true


)


</script>

<template>
<div ref="table">
<b-modal v-model="modalShow">Test</b-modal>
</div>
</template>






vue.js modal-dialog bootstrap-modal tabulator






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 23 at 16:10









Joshua WilsonJoshua Wilson

61




61







  • 1





    Try this. change return modalShow: true to this.modalShow = true

    – dagalti
    Mar 23 at 16:25












  • 1





    Try this. change return modalShow: true to this.modalShow = true

    – dagalti
    Mar 23 at 16:25







1




1





Try this. change return modalShow: true to this.modalShow = true

– dagalti
Mar 23 at 16:25





Try this. change return modalShow: true to this.modalShow = true

– dagalti
Mar 23 at 16:25












1 Answer
1






active

oldest

votes


















0














User @dagalti is almost correct - in their example, this would refer to Tabulator, so you have to capture the Vue instance at an elevated scope, in a variable I have named self. See my modifications to your code, below.



mounted () 
var self = this;

// instantiate Tabulator when element is mounted
this.tabulator = new Tabulator(this.$refs.table,
data: this.tableData, // link data to table
layout: 'fitColumns',
columns: [
title: 'Name', field: 'name', sorter: 'string', width: 200,
title: 'Age', field: 'age', sorter: 'number', align: 'right', formatter: 'progress'
],
cellClick: function (e, cell)
var name = cell.getRow().getCell('name').getValue()
var value = cell.getValue()
var field = cell.getField()
console.log(name, value, field)

self.modalShow = true;

)






share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55315725%2fcant-open-modal-on-cellclick%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    User @dagalti is almost correct - in their example, this would refer to Tabulator, so you have to capture the Vue instance at an elevated scope, in a variable I have named self. See my modifications to your code, below.



    mounted () 
    var self = this;

    // instantiate Tabulator when element is mounted
    this.tabulator = new Tabulator(this.$refs.table,
    data: this.tableData, // link data to table
    layout: 'fitColumns',
    columns: [
    title: 'Name', field: 'name', sorter: 'string', width: 200,
    title: 'Age', field: 'age', sorter: 'number', align: 'right', formatter: 'progress'
    ],
    cellClick: function (e, cell)
    var name = cell.getRow().getCell('name').getValue()
    var value = cell.getValue()
    var field = cell.getField()
    console.log(name, value, field)

    self.modalShow = true;

    )






    share|improve this answer



























      0














      User @dagalti is almost correct - in their example, this would refer to Tabulator, so you have to capture the Vue instance at an elevated scope, in a variable I have named self. See my modifications to your code, below.



      mounted () 
      var self = this;

      // instantiate Tabulator when element is mounted
      this.tabulator = new Tabulator(this.$refs.table,
      data: this.tableData, // link data to table
      layout: 'fitColumns',
      columns: [
      title: 'Name', field: 'name', sorter: 'string', width: 200,
      title: 'Age', field: 'age', sorter: 'number', align: 'right', formatter: 'progress'
      ],
      cellClick: function (e, cell)
      var name = cell.getRow().getCell('name').getValue()
      var value = cell.getValue()
      var field = cell.getField()
      console.log(name, value, field)

      self.modalShow = true;

      )






      share|improve this answer

























        0












        0








        0







        User @dagalti is almost correct - in their example, this would refer to Tabulator, so you have to capture the Vue instance at an elevated scope, in a variable I have named self. See my modifications to your code, below.



        mounted () 
        var self = this;

        // instantiate Tabulator when element is mounted
        this.tabulator = new Tabulator(this.$refs.table,
        data: this.tableData, // link data to table
        layout: 'fitColumns',
        columns: [
        title: 'Name', field: 'name', sorter: 'string', width: 200,
        title: 'Age', field: 'age', sorter: 'number', align: 'right', formatter: 'progress'
        ],
        cellClick: function (e, cell)
        var name = cell.getRow().getCell('name').getValue()
        var value = cell.getValue()
        var field = cell.getField()
        console.log(name, value, field)

        self.modalShow = true;

        )






        share|improve this answer













        User @dagalti is almost correct - in their example, this would refer to Tabulator, so you have to capture the Vue instance at an elevated scope, in a variable I have named self. See my modifications to your code, below.



        mounted () 
        var self = this;

        // instantiate Tabulator when element is mounted
        this.tabulator = new Tabulator(this.$refs.table,
        data: this.tableData, // link data to table
        layout: 'fitColumns',
        columns: [
        title: 'Name', field: 'name', sorter: 'string', width: 200,
        title: 'Age', field: 'age', sorter: 'number', align: 'right', formatter: 'progress'
        ],
        cellClick: function (e, cell)
        var name = cell.getRow().getCell('name').getValue()
        var value = cell.getValue()
        var field = cell.getField()
        console.log(name, value, field)

        self.modalShow = true;

        )







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 25 at 0:04









        haferjehaferje

        60321117




        60321117





























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55315725%2fcant-open-modal-on-cellclick%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

            SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

            은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현