Skip to content

Try <a>'ing links#1193

Open
AbelLykens wants to merge 1 commit intodesec-io:mainfrom
AbelLykens:main
Open

Try <a>'ing links#1193
AbelLykens wants to merge 1 commit intodesec-io:mainfrom
AbelLykens:main

Conversation

@AbelLykens
Copy link

Hope this works, for #1192.

CrudList.vue — The column template now checks for a column.link function. If present, the column content is wrapped in a (renders as ). The @click.native.stop prevents the click from bubbling up to the row's @click:row handler, so regular clicks navigate via the link, and ctrl-click / middle-click / right-click all work natively. Columns without link render exactly as before.
CrudListDomain.vue — Added link: (item) => ({name: 'domain', params: {domain: item.name}}) to the name column. This generates the /domains/example.com URL as a proper href.
The existing handleRowClick is kept, so clicking anywhere else on the row (e.g. the "Published" column) still navigates as before. But now the domain name is a real link with full browser link semantics: right-click menu, open in new tab, ctrl/cmd-click, middle-click, and URL preview in the status bar.

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.

1 participant