I have a Link to web type link with a checkbox Open in new tab unchecked. In the API response there is no attribute to represent this choice. (However, if I check the checkbox it returns a target property)
Current behaviour
I pass the field data to the <PrismicLink> component from @prismicio/react and it renders a link which opens in new page.
Expected behaviour
I pass a field data without the Open in new tab checked the component renders a Link which opens in the same tab.
I pass a field data with the Open in new tab checked the component renders a Link which opens a new tab.
There are two main reasons why this happens: either the target wasn't correctly saved in the field, or the version of the kit @prismicio/react is not on the latest version.
The best way is by looking for the doc in the API browser of your repo: https://your-repo-name.prismic.io/api/v2. You can share your endpoint with us, and we can check simultaneously. What's your Custom Type's name and the field's API ID?
In the slices you should check the first slice (page_title) and there is a field called btn_link. Now just two fields are there: type=Web and url=https.... The checkbox is not checked on the Prismic admin. If i check the checkbox the field called target will appear in the api response.
Ok so if the target appears in the API response, it means the issue is on the front-end. How are you handing internal links inside the project? aside from using the components from the kit.
PrismicLink is imported from the latest version of the lib. The Open in new tab is not checked.
Result: Meet our Glasgow team | Scott Logic (Click on the View our vacancies link in the header)