mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
feat(segment-view): add swipeGesture property to disable swiping (#30948)
Issue number: resolves #30290 --------- ## What is the current behavior? The segment view swipe gesture can only be disabled by adding the `disabled` property and setting `opacity: 1`. ## What is the new behavior? - Adds a new property, `swipeGesture`, to disable swiping on the segment view - Adds an e2e test which verifies the styles blocking the swipe are correctly applied when `swipeGesture` is `false` ## Does this introduce a breaking change? - [ ] Yes - [x] No --------- Co-authored-by: Brandy Smith <6577830+brandyscarney@users.noreply.github.com>
This commit is contained in:
@@ -2113,14 +2113,14 @@ export declare interface IonSegmentContent extends Components.IonSegmentContent
|
||||
|
||||
|
||||
@ProxyCmp({
|
||||
inputs: ['disabled']
|
||||
inputs: ['disabled', 'swipeGesture']
|
||||
})
|
||||
@Component({
|
||||
selector: 'ion-segment-view',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
template: '<ng-content></ng-content>',
|
||||
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
||||
inputs: ['disabled'],
|
||||
inputs: ['disabled', 'swipeGesture'],
|
||||
})
|
||||
export class IonSegmentView {
|
||||
protected el: HTMLIonSegmentViewElement;
|
||||
|
||||
@@ -1889,14 +1889,14 @@ export declare interface IonSegmentContent extends Components.IonSegmentContent
|
||||
|
||||
@ProxyCmp({
|
||||
defineCustomElementFn: defineIonSegmentView,
|
||||
inputs: ['disabled']
|
||||
inputs: ['disabled', 'swipeGesture']
|
||||
})
|
||||
@Component({
|
||||
selector: 'ion-segment-view',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
template: '<ng-content></ng-content>',
|
||||
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
||||
inputs: ['disabled'],
|
||||
inputs: ['disabled', 'swipeGesture'],
|
||||
standalone: true
|
||||
})
|
||||
export class IonSegmentView {
|
||||
|
||||
@@ -899,6 +899,7 @@ export const IonSegmentContent: StencilVueComponent<JSX.IonSegmentContent> = /*@
|
||||
|
||||
export const IonSegmentView: StencilVueComponent<JSX.IonSegmentView> = /*@__PURE__*/ defineContainer<JSX.IonSegmentView>('ion-segment-view', defineIonSegmentView, [
|
||||
'disabled',
|
||||
'swipeGesture',
|
||||
'ionSegmentViewScroll'
|
||||
], [
|
||||
'ionSegmentViewScroll'
|
||||
|
||||
Reference in New Issue
Block a user