obsidian-test-vault/ui/task.md

515 B

return function View() {
	const q = dc.useQuery(`@task and startswith($file, "data/02 - ") and regexreplace($cleantext, "^\\s+|\\s+$", "") != "" and $parentLine < 0`, {debounce: 10});
	const sq = dc.useMemo(() => q.sort((a, b) => a.$cleantext > b.$cleantext ? 1 : a.$cleantext < b.$cleantext ? -1 : 0), [q])
	const fields = [{
		type: "string",	
		renderAs: "raw",
		key: "field",
		editable: true,
		defaultValue: null
	}]
	return (<>
		<dc.TaskList rows={sq} displayedFields={fields}/>
	</>)
}