Comments (9)
I found the code change from Ionic 3.2.0 release.
ionic-team/ionic-framework@5d56216#diff-c7183d7ba6fabfec3a2be33bf4b070f8
This problem is caused by the change of src/components/segment/segment-button.ts
file.
The code
constructor(private _renderer: Renderer, private _elementRef: ElementRef) {}
Changed to
constructor() {}
So now super-tabs cannot find variable _elementRef
from SegmentButton
private indexSegmentButtonWidths() {
let index = [], total = 0;
this.segmentButtons.forEach((btn: SegmentButton, i: number) => {
// Cannot read property 'nativeElement' of undefined
index[i] = <ElementRef>(<any>btn)._elementRef.nativeElement.offsetWidth;
total += index[i] + 10;
});
this.segmentButtonWidths = index;
this.segmentWidth = total;
}
So.. @ihadeed we should figure out the way to get _elementRef
by fixing the code below.
@ViewChildren(SegmentButton)
private segmentButtons: QueryList<SegmentButton>;
from ionic-super-tabs.
Working on a fix now. Getting rid of ion-segment
completely and building a custom component from scratch. A step closer to making this plugin less "hacky" ...
from ionic-super-tabs.
Fixed in [email protected]
.
from ionic-super-tabs.
I have the same problem. The scrollTabs not work in this new version.
from ionic-super-tabs.
@ihadeed It is fixed basically version was not updated in my package.json which is 2.6.1 not 2.6.0, so ionic embed older code while packaging.
DON'T forget to add --save flag while updating
npm install --save ionic2-super-tabs@latest
Thank you for hard work to make this functionality work 👍
from ionic-super-tabs.
@ViewChildren(SegmentButton, { read: ElementRef })
private segmentButtons: QueryList<ElementRef>;
this.segmentButtons.forEach((btn: ElementRef, i: number) => {
index[i] = btn.nativeElement.offsetWidth;
total += index[i] + 10;
});
from ionic-super-tabs.
@ihadeed Cannot update to 2.6.0, getting the following error:
pm ERR! notarget No compatible version found: [email protected]
npm ERR! notarget Valid install targets:
npm ERR! notarget 0.1.0, 0.2.0, 1.0.0, 1.1.0, 1.1.1, 2.0.0-alpha.1, 2.0.0-alpha.2, 2.0.0-beta.1, 2.0.0, 2.1.0, 2.2.0, 2.2.2, 2.3.0, 2.3.1, 2.3.2, 2.3.3, 2.4.1, 2.4.2, 2.5.0, 2.5.1, 2.5.2
npm ERR! notarget
Could you perhaps have forgotten to publish the new tag on npm?..
from ionic-super-tabs.
@hayuki looks like a valid tag to me... try clearing your NPM cache by running npm cache clear
from ionic-super-tabs.
@ihadeed I have tried to install 2.6.0 it seems like installed but after clearing npm cache
.
I checked the version which is same as before; also problem persist:
from ionic-super-tabs.
Related Issues (20)
- tab indicator is not located correctly in firefox when padding exists
- ReIndexTabs undefined issue renders the tab blank HOT 2
- Super Tabs Toolbar pushed up when keyboard is activated HOT 1
- Need help on Super tab containing Table with horizontal scrollbar and fixed column HOT 2
- How to place super-tabs inside ion-toolbar HOT 2
- Framework Delegate is Missing Zone <root> (ion-nav root component not showing in browser) HOT 2
- When i prefetched new tabs list and concat it to the current tabs list the tab toolbar scrolls back to the last selected tab.
- How to change color from indicator and icon on the app?
- in 7.0.8 Version - Its throwing error as Can not read Property 'TransitionDuration' of Undefined. HOT 1
- Angular 10 || 11 and Ionic 5: Generic type 'ModuleWithProviders<T>' requires 1 type argument(s) error HOT 1
- Change tab programmatically. activeTabIndex not work.
- There isn't any props to disable ion-ripple-effect HOT 6
- Lazy loadingn not working - unloadWhenInvisible doing nothing HOT 2
- Tab content become empty when change tabs. Happens only on iOS 14.5 upwards
- super-tab-button animation slides from top on load
- Super Tabs - how to pass page to [root] correctly? HOT 1
- Having two supertabs pages, how to go from first page to second page programmatically?
- ion-refresher doesn't work in multiple tabs
- *ngIf and *ngOf directives not working
- not working on latest ionic v7.1.1 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ionic-super-tabs.