Skip to content

Conversation

medjedovicm
Copy link

Resolves #131, resolves #132

Implementation

  • New segment type introduced link
  • Path or URL is detected and appropriate CSS is applied. (purple colour, text underlined)
  • In such case, the segment is clickable
  • When clicked, output event is fired: segmentLinkClicked payload is type string containing the clicked segment value

Copy link

@RamonHaugLand RamonHaugLand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comment but I also want the feautre.

private isLink(value: string): boolean {
return value.substring(0, 8) === 'https://' ||
value.substring(0, 7) === 'http://' ||
value[0] === '/'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if this is changed to a RegExp, the scheme is not case sensitive, and is also posible http:(domain)
Reference

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I was delayed a bit. I pushed and would appreciate your review.

@medjedovicm
Copy link
Author

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

If data has url how to display it as link (Hyperlink) Displaying hyperlinks

3 participants