Ignore fragments option / fragments included in query object
See original GitHub issueIt would be great if there was an option to ignore fragments/prevent fragments from triggering a route change. We aren’t using a hashbang scheme for our app, but we have links that are required to go to different anchors on the page.
For example, if I am on the main page of our app (/app/home) and click on an anchor that is supposed to scroll the user further down the page (/app/home#search), the route changes, which we don’t actually want.
Fragments are also included in the query object, which they shouldn’t be.
/app/search?q=Blah&type=documents#search
Query object:
{
'q': 'Blah',
'type': 'documents#search'
}
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Fragments - Apollo GraphQL Docs
A GraphQL fragment is a piece of logic that can be shared between multiple queries and mutations. ... Every fragment includes a subset...
Read more >How to exclude empty types when using fragments? #5567
Looking at this query, it's clear that the type can only be homepage_homepage_Entry . But the code generator generates this one: export type ......
Read more >Content Fragment Models (Assets - Experience League - Adobe
Learn how Content Fragment Models serve as a foundation for your headless content in AEM and how to create Content Fragments with structured ......
Read more >Fragment | Android Developers
All subclasses of Fragment must include a public no-argument constructor. ... This hook is called whenever an item in your options menu is...
Read more >GraphQL Tutorial: how to use fields, fragments, and more
Sometimes we'll want to include the option for dynamic arguments in our queries, such as when making a search bar. GraphQL allows dynamic ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@struct78 the
route.query()
was designed to handle a url like this:not like this:
But it should be able to handle the latter one, I think. We can simply change the RegExp on this line: https://github.com/riot/route/blob/f1bd42223963f9170cfd60045ca5824cb0f0f17f/src/index.js#L305
Closing this issue because it’s related to an old router version. Please update to the latest
@riotjs/route
version if you can.