New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
List Item Sliding with Actions #180
Comments
Currently not implemented. But since you brought this up, adding it to the todo list. PS: I've just installed the search plugin that's why it seems unstable at the moment. Should work ok now. |
Tks! You have a deadline? |
Currently no, but will post it here as soon as it's available. |
Would love to have this component. When will this be available ? |
Quasar v0.14 - a month max probably. |
I would also love to have this feature. |
@rstoenescu This was moved to 0.15? |
By mistake. It remains for v0.14. |
Where is this? Can't find it and could really use it! |
The milestone for this is v1.0, which is next after v0.15. |
Does it leave in 2018? |
I made a simple custom implementation for this which works pretty well: Usage:Use it like so: <options-reveal
v-for="(item, key) in items"
:key="key"
:options="[{
name: 'Delete',
action () { return dispatch('deleteItem', key) },
style: 'background-color: red;',
}]"
>
<!-- your list item -->
</options-reveal> Explanation:So you have your Example:Vue component:<template>
<div
class="options-reveal"
v-touch-swipe.left.right="handler"
>
<div
:style="style"
class="_wrapper"
>
<slot />
</div>
<div class="_options">
<button
v-for="option in options"
@click="option.action()"
:style="option.style"
>{{ option.name }}</button>
</div>
</div>
</template> <script>
import { dom } from 'quasar'
const { cssTransform } = dom
export default {
props: ['options'],
data () { return { opened: false } },
computed:
{
style () {
if (this.opened) {
const optionsAmount = this.options.length * 100
const props = cssTransform(`translateX(-${optionsAmount}px)`)
return Object.keys(props).reduce((carry, key) => {
return `${carry}${key}: ${props[key]}; `
}, '')
}
return ''
},
},
methods:
{
handler (obj) {
if (obj.direction === 'right') this.opened = false
if (obj.direction === 'left') this.opened = true
},
}
}
</script> <style lang="stylus" scoped>
.options-reveal
position relative
._wrapper
position relative
z-index 2
transition all 100ms ease-out
._options
position absolute
z-index 1
top 0
right 0
left 0
bottom 0
display flex
justify-content flex-end
> button
margin 0
padding 0
border none
border-left thin solid white
width 100px
height 100%
background-color gray
</style> |
Needs some improvements like not setting each option to take 100px width, but I'm sure this will be a good base. Edit: sorry I had one small bug which I fixed in the code above: style () {
if (this.opened) {
const optionsAmount = this.options.length * 100
const props = cssTransform(`translateX(-${optionsAmount}px)`) forgot the |
Would love to see this component supported by Quasar Similar examples from other libraries |
Already in version 0.17, do we really have the item-sliding feature in quasar? |
I think a component like this will be available soon. I heard rumours of this being worked on. |
@mesqueeb I can't implement the component you showed by example, can I use v-touch in quasar? Or was the example not used in the quasar? |
@profalves i use it fine with Quasar.
See documentation here: |
Done for v1.0 -- QSlideItem |
This issue was closed, stating it's implementation in v.1.0, yet I don't see any mention of this in the API documentation. Are you able to add multiple action:options for each slide-item direction, or was this added and then later removed from Quasar? I can make my own component to do so, but don't want to reinvent the wheel if it's already been done. Eg. Slide left reveals multiple actions
|
I have the same need as @wwwizzarrdry :) is this feature planned ? |
Hi,
Sorry to send the question here, but it is because the forum is very unstable.
A while ago, I found a component type the "sliding item" of the Ionic Framework. I can not find the component on the Quasar website. Can you pass me the url where I find such a component in the Quasar Framework?
The component you mention is this one: http://ionicframework.com/docs/v2/api/components/item/ItemSliding/
Thank you.
The text was updated successfully, but these errors were encountered: