Skip to content
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

Require Swipe Functionality to ListView Item #1646

Open
mehsaandev opened this issue Sep 26, 2024 · 3 comments · May be fixed by #1659
Open

Require Swipe Functionality to ListView Item #1646

mehsaandev opened this issue Sep 26, 2024 · 3 comments · May be fixed by #1659
Assignees

Comments

@mehsaandev
Copy link

Requirements:

  • Require a swipe functionality in the ListView in which each item of the list is swipeable and on Swipe left, there should be an option of adding Action Button/Icon by which we can perform any action(e.g. Delete or Edit) on that item of the List
  • e.g. images:
  1. Image Before Swipe:
    image

  2. Image After Swipe:
    image

  • After Swipe the Delete Icon is the action Button which will be able to delete that entry on API call.
@kmahmood74
Copy link
Collaborator

cc @vusters

@TheNoumanDev
Copy link
Member

PR: #1659

Example EDL:

- ListView:
    id: listView
    styles: 
      expanded: true 
      enableSwipe: true # default is false to maintain backward compatability
      swipeAnimationDuration: 200 # miliseconds
      swipeThreshold: 0.2  # (means 20 percent of screen and 1 means 100%)
    swipeWidget:
      FlexRow:
        styles:
          height: ${device.height}
          backgroundColor: black
        children:
          - Icon:
              name: delete
              color: red
              onTap: |
                console.log("hello");
    children:
      - MyRow:
          inputs:
            p: ${users}
      - MyRow:
          inputs:
            p: ${users}
      - MyRow:
          inputs:
            p: ${users}

@kmahmood74
Copy link
Collaborator

EDL looks good, thanks @TheNoumanDev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants