Ask questionsCannot set target prop on Anchor

<!--- Provide a general summary of the issue in the Title above -->

Expected Behavior

<Anchor href="/hello" target="_blank" label="here" />

This should set the link to open in a new tab, with the target prop.

Actual Behavior

<!--- Tell us what happens instead -->

<a href="/hello" class="StyledAnchor-sc-1rp7lwl-0 gzrmWK">here</a>

This is the generated HTML. It creates the HTML without the target prop.

Steps to Reproduce

Use the code in the first section.

Your Environment

<!--- Include as many relevant details about the environment you experienced the bug in -->

  • Grommet version: 2.11.2
  • Browser Name and version: Firefox 75.0
  • Operating System and version (desktop or mobile): Ubuntu 18.04.3

Answer questions arvind0598

@arvind0598 Have you tried testing if the anchor opens in a new window? Although, you might not see it, with the current version of grommet im able to set target="_blank" effectively.

Yeah I have. It wasn’t working for me. After that I checked the HTML and saw there was no prop for it.

I’m not sure if it’s more buggy or less buggy if it’s opening a link in a new tab without having a target prop in the HTML, haha.


Related questions

Failed prop type: Invalid prop `value` of type `number` supplied to `TextInput` hot 1
Github User Rank List