mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
If undefined collection, use item as relative url (#15806)
* If no undefined collection, use item as relative url * Only navigate if item is set * Added Gerard Lamusse (u12206050) --------- Co-authored-by: Brainslug <br41nslug@users.noreply.github.com> Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
This commit is contained in:
@@ -191,12 +191,16 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
function onRowClick({ item }: { item: Item; event: PointerEvent }) {
|
||||
const collection = collectionsStore.getCollection(item.collection);
|
||||
if (item.collection) {
|
||||
const collection = collectionsStore.getCollection(item.collection);
|
||||
|
||||
if (collection?.meta?.singleton) {
|
||||
router.push(`/content/${item.collection}`);
|
||||
} else {
|
||||
router.push(`/content/${item.collection}/${item.item}`);
|
||||
if (collection?.meta?.singleton) {
|
||||
router.push(`/content/${item.collection}`);
|
||||
} else {
|
||||
router.push(`/content/${item.collection}/${item.item}`);
|
||||
}
|
||||
} else if (String(item.item).startsWith('/')) {
|
||||
router.push(item.item);
|
||||
}
|
||||
|
||||
notificationsDrawerOpen.value = false;
|
||||
|
||||
@@ -7,5 +7,6 @@
|
||||
- bicouy0
|
||||
- Nitwel
|
||||
- azrikahar
|
||||
- u12206050
|
||||
- that1matt
|
||||
- jaads
|
||||
|
||||
Reference in New Issue
Block a user