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;
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
add a comment |
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
1
Try this. changereturn modalShow: true
tothis.modalShow = true
– dagalti
Mar 23 at 16:25
add a comment |
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
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
vue.js modal-dialog bootstrap-modal tabulator
asked Mar 23 at 16:10
Joshua WilsonJoshua Wilson
61
61
1
Try this. changereturn modalShow: true
tothis.modalShow = true
– dagalti
Mar 23 at 16:25
add a comment |
1
Try this. changereturn modalShow: true
tothis.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
add a comment |
1 Answer
1
active
oldest
votes
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;
)
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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;
)
add a comment |
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;
)
add a comment |
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;
)
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;
)
answered Mar 25 at 0:04
haferjehaferje
60321117
60321117
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
1
Try this. change
return modalShow: true
tothis.modalShow = true
– dagalti
Mar 23 at 16:25