()
| 367 | } |
| 368 | |
| 369 | private getSegmentView() { |
| 370 | const buttons = this.getButtons(); |
| 371 | // Get the first button with a contentId |
| 372 | const firstContentId = buttons.find((button: HTMLIonSegmentButtonElement) => button.contentId); |
| 373 | // Get the segment content with an id matching the button's contentId |
| 374 | const segmentContent = document.querySelector(`ion-segment-content[id="${firstContentId?.contentId}"]`); |
| 375 | // Return the segment view for that matching segment content |
| 376 | return segmentContent?.closest('ion-segment-view'); |
| 377 | } |
| 378 | |
| 379 | @Listen('ionSegmentViewScroll', { target: 'body' }) |
| 380 | handleSegmentViewScroll(ev: CustomEvent<SegmentViewScrollEvent>) { |
no test coverage detected