mirror of
https://github.com/directus/directus.git
synced 2026-04-03 03:00:39 -04:00
* Start on tree-select component * Stop propagation on label click as well * Setup temp debug route * Add value-combining=all * Add branch mode * Add leaf mode * Add indeterminate state * Add search * Keep group state alive during search * Fetch existing item based on clone fields data * Add interface for setup * Tweak field structure of m2a items * Use collection name in checkbox * Remove temp test
useFieldTree
Generate out a field tree based on the given collection.
type FieldTree = {
field: string;
name: string;
children?: FieldTree[];
};
useFieldTree(collection: Ref<string>): { tree: FieldTree }
Usage
const collection = ref('articles');
const { tree } = useFieldTree(collection);