Skip to content
This repository has been archived by the owner on Dec 15, 2018. It is now read-only.

Query parameters are not rendered to the href of Link #121

Closed
mike-marcacci opened this issue Nov 8, 2016 · 2 comments
Closed

Query parameters are not rendered to the href of Link #121

mike-marcacci opened this issue Nov 8, 2016 · 2 comments

Comments

@mike-marcacci
Copy link

If you create a <Link /> element with either a string or object href, it renders the <a /> tag without any of the query parameters. The onClick handler DOES redirect the browser to the correct place (with the query parameters), but omits it from the actual markup, breaking command-clicks, etc, and any automated traversing like search engines.

Input

<div>
	<Link href='/pathname?foo=bar'>String</Link>
	<Link href={{pathname: '/pathname', query: {foo: 'bar'}}}>Query</Link>
	<Link href={{pathname: '/pathname', search: '?foo=bar'}}>Search</Link>
</div>

Expected

<div>
	<a href='/pathname?foo=bar'>String</a>
	<a href='/pathname?foo=bar'>Query</a>
	<a href='/pathname?foo=bar'>Search</a>
</div>

Actual

<div>
	<a href='/pathname'>String</a>
	<a href='/pathname'>Query</a>
	<a href='/pathname'>Search</a>
</div>
@tptee tptee mentioned this issue Dec 16, 2016
Merged
12 tasks
@tptee
Copy link
Contributor

tptee commented Dec 21, 2016

This is fixed in WIP PR #130! I had some bad tests stubs that resulted in false positives before 😬 I'll ping here on release.

@tptee
Copy link
Contributor

tptee commented Mar 23, 2017

Should be fixed in v13.0.0!

@tptee tptee closed this as completed Mar 23, 2017
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