Files
directus/docs/index.md
Rijk van Zanten 08203d0829 Fix snippet toggler active state, sync selected value across page (#19884)
* Use vueuse localStorage instead of custom

Fixes #19879

* Prevent flashing & jumping

- localStorage should only be initialized on client side, preventing
  flash if value in localStorage doesn't equal choices[0]
- updates from localStorage should only be applied if value exists in
  choices
- height of snippet toggler now always remains at the height of the largest content, preventing page jumping

* Use expanded fields syntax

---------

Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2023-10-04 14:32:57 -04:00

8.5 KiB

layout
layout
home
<script setup lang="ts"> import { data } from './.vitepress/data/blog.data.js'; import Pattern from './.vitepress/components/home/Pattern.vue'; import Footer from './.vitepress/components/home/Footer.vue'; import Github from './.vitepress/components/home/icons/Github.vue'; import Badge from './.vitepress/components/Badge.vue' </script>
Resource Hub

Directus Documentation

Explore our resources and powerful data engine to build your projects confidently.

Get Started GitHub
GET /items/products/4
	?fields[]=id
	&fields[]=status
	&fields[]=title
	&fields[]=category
	&fields[]=image.id
	&fields[]=image.name
query {
	articles_by_id(id: 4) {
		id
		status
		title
		category
		image {
			id
			name
		}
	}
}
await directus.request(
  readItem('articles', 4, {
    fields: [
      'id',
      'status',
      'title',
      'category,',
      { image: ['id', 'name'] }
    ]
  })
);

Latest From The Blog

Project tutorials, tips & tricks, and best practices from the Directus team and community.

View All Posts

Framework Guides

Combine Directus with your favorite framework to create dynamic and efficient web applications.

View All Guides

Self Hosted Directus

Learn how to run Directus on your own machine, customize settings, and deploy with confidence.

Contributing to Directus

There are many ways in which you can contribute to the health and growth of the Directus project.

Join the Community GitHub
<style module> @import './home.css'; </style>