Skip to content

feat: ion-item-sliding open start and end options at the same time #21361

@Enteee

Description

@Enteee

Feature Request

Ionic version:

[x] 4.x

Describe the Feature Request
Open ion-item-sliding on start and end using open("both").

Use case
I would like to use this to implement a counter which can be changed by either clicking on the corresponding "+" / "-" option on either end or by swiping over the counter in the corresponding direction. Please see image below.

Describe Preferred Solution
I would like to open a ion-item-sliding on both sides using some programmatic API. This would help me implement a button which can either be clicked or using a slide motion to activate.

slider-open

Describe Alternatives
Currently I am using a button on both sides of the slider to mimic the same behavior (see screenshot). This comes with the following downsides which I have to fix with custom JavaScript:

  • when sliding to one side the other side's button is not hidden
    slide-no-close
  • the slider can still stay open which results in a button a bit wider on one side (ugly)
    slider-open-ugly

-> Maybe some very dark CSS wizardry or using internal functions could be used to achieve the same.

Related Code

Additional Context

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions