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

Tabbar broken in React #1528

Closed
argelius opened this issue Jul 28, 2016 · 4 comments
Closed

Tabbar broken in React #1528

argelius opened this issue Jul 28, 2016 · 4 comments

Comments

@argelius
Copy link
Contributor

@anatoo I think #1492 broke the tabbar in React.

It's trying to use the pageLoader but that is not necessary in React since the pages are already rendered by React. Do you have any idea what changed? I tried to debug the code but there are a lot of changes in both <ons-tabbar> and <ons-tab> and I couldn't find what change is causing the problem.

In React the pages are rendered and put into the .tab-bar__content element so there is no need to load pages.

@anatoo
Copy link
Contributor

anatoo commented Jul 29, 2016

@argelius What about setting a page loader that do nothing?

onsTab.pageLoader = new ons.PageLoader(({page, parent}, done) => {
  done({element: document.createElement('div'), unload: () => {}});
});

@argelius
Copy link
Contributor Author

@anatoo Good idea! I will try this

@argelius
Copy link
Contributor Author

Actually this is still causing an error:

VM3262:23001 Uncaught Error: Invalid state: page element must be a "ons-page" element.

@anatoo
Copy link
Contributor

anatoo commented Jul 29, 2016

hmm...

Do you set "page" attribute on ons-tab?
I think you should not page attribute or property because it cause page-loader's load.

@lock lock bot added the outdated label May 17, 2018
@lock lock bot locked as resolved and limited conversation to collaborators May 17, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants