How to add kyeup:13 on popup modal in vuejs? - vue.js

I want enter key should work on popup window.
I tried this
<button class="btn btn-primary" type="button" v-on:click="renameFolder(folder.Id)" v-on:keyup.13="renameFolder(folder.Id)">Rename</button>
Enter key does not work

Related

GetElementById, but I can't find the ID in vb.net

I was trying to use getelementbyid on vb.net, but I can't find the ID, can you help me? The button code is this below:
<button class="btn btn-default btn-block" type="button" onclick="start()"
What code do I use to press the desired button?

ng-bootstrap tooltip arrow is missing

I am using angular 5. I am added "ng-bootstrap. arrow is missing.
<button type="button" class="btn btn-outline-secondary" placement="right" ngbTooltip="Tooltip on right">
Tooltip on right
</button>
Upgrade to #ng-bootstrap/ng-bootstrap": "11.0.0-beta.2" as per https://www.npmjs.com/package/#ng-bootstrap/ng-bootstrap#dependencies

how to pass index to sibling div/tag

I'm developing a mobile app using phonegap, vuejs2 and onsenui. I installed vue2-touch-events plugin for touch events. In this app i'm rendering some data using v-for. Here is the div.
<v-ons-list-item class="swipeArea"
v-for="(list, index) in todoLists"
v-bind:key="list.todo"
v-if="!list.completed"
v-touch:swipe.left="deleteLisItem(index)"
v-touch:swipe.right="doneLisItem(index)"
v-touch:longtap="deleteOrDone(index)" tappable>
<label class="center">
<i class="zmdi zmdi-check" aria-hidden="true"></i> {{ list.todo }}
</label>
</v-ons-list-item>
And then when user longtap a list there will be a pop with 3 button. Done, Delete and cancel. When user tap done, the item will be mark as done, if click delete, the item will be deleted and click cancel will cancel the event. Here is the div
<div v-if="doneOrDelete" id="doneOrDelete">
<div class="action-sheet-mask"></div>
<div class="action-sheet">
<button class="action-sheet-button" #click="doneLisItem">Done</button>
<button class="action-sheet-button action-sheet-button--destructive" #click="deleteLisItem">Delete</button>
<button class="action-sheet-button" #click="doneOrDelete=false">Cancel</button>
</div>
</div>
Now all i have to do is pass the index to the method. Can anyone help me how pass the index? TIA

Bootsrap href to button not working mobile but working for desktop

Here is my code:
<a href="dashboard.php">
<button type="button" class="btn btn-primary" style="background-color:#5f5f5f;">
View Summary
</button>
</a>
Any help is appreciated.
This is the easy way to do that:
View Summary
Please look at this http://www.w3schools.com/bootstrap/bootstrap_buttons.asp
And consider adding additional class for background color in CSS.
You may check this Fiddle
It's just wrapping button in anchor tags..
<div class="btn-group">
<a href=href="dashboard.php"><button class="btn btn-primary dropdown-toggle">
View Summary
</button></a>
</div>

Show or Hide buttons from property value

I have a list of items in a table and want to enable or disable some buttons based off a boolean property called "enabled". Code for the buttons are as follows
<button class="btn btn-sm btn-primary" show.bind="item.enabled" click.delegate="toggleEnabled()">Disable</button>
<button class="btn btn-sm btn-warning" show.bind="!item.enabled" click.delegate="toggleEnabled()">Enable</button>
No matter what the value for item.enabled, only the disable button shows. Wondering what I am missing?
click.delegate="item.toggleEnabled()" add the item. before toggleEnabled and you'll be good to go!
Here is an example with working code: https://github.com/AshleyGrant/skeleton-navigation/tree/so-answer-20150416-02/src
Make sure that item.enabled is being returned as a boolean and not a string.