1 line
3.4 KiB
JavaScript
1 line
3.4 KiB
JavaScript
import{_ as t,c as a,a0 as o,o as r}from"./chunks/framework.P9qPzDnn.js";const p=JSON.parse('{"title":"Function: setupSelectable()","description":"","frontmatter":{"editLink":false},"headers":[],"relativePath":"api/data/common/functions/setupSelectable.md","filePath":"api/data/common/functions/setupSelectable.md","lastUpdated":null}'),n={name:"api/data/common/functions/setupSelectable.md"};function c(s,e,l,d,i,u){return r(),a("div",null,e[0]||(e[0]=[o('<p><a href="./../../../">Profectus</a> / <a href="./../">data/common</a> / setupSelectable</p><h1 id="function-setupselectable" tabindex="-1">Function: setupSelectable() <a class="header-anchor" href="#function-setupselectable" aria-label="Permalink to "Function: setupSelectable()""></a></h1><blockquote><p><strong>setupSelectable</strong><<code>T</code>>(): <code>object</code></p></blockquote><p>Utility function for setting up a system where one of many things can be selected. It's recommended to use an ID or index rather than the object itself, so that you can wrap the ref in a persistent without breaking anything.</p><h2 id="type-parameters" tabindex="-1">Type Parameters <a class="header-anchor" href="#type-parameters" aria-label="Permalink to "Type Parameters""></a></h2><p>• <strong>T</strong></p><h2 id="returns" tabindex="-1">Returns <a class="header-anchor" href="#returns" aria-label="Permalink to "Returns""></a></h2><p><code>object</code></p><p>The ref containing the selection, as well as a select and deselect function</p><h3 id="deselect" tabindex="-1">deselect() <a class="header-anchor" href="#deselect" aria-label="Permalink to "deselect()""></a></h3><blockquote><p><strong>deselect</strong>: () => <code>void</code></p></blockquote><h4 id="returns-1" tabindex="-1">Returns <a class="header-anchor" href="#returns-1" aria-label="Permalink to "Returns""></a></h4><p><code>void</code></p><h3 id="select" tabindex="-1">select() <a class="header-anchor" href="#select" aria-label="Permalink to "select()""></a></h3><blockquote><p><strong>select</strong>: (<code>node</code>) => <code>void</code></p></blockquote><h4 id="parameters" tabindex="-1">Parameters <a class="header-anchor" href="#parameters" aria-label="Permalink to "Parameters""></a></h4><h5 id="node" tabindex="-1">node <a class="header-anchor" href="#node" aria-label="Permalink to "node""></a></h5><p><code>T</code></p><h4 id="returns-2" tabindex="-1">Returns <a class="header-anchor" href="#returns-2" aria-label="Permalink to "Returns""></a></h4><p><code>void</code></p><h3 id="selected" tabindex="-1">selected <a class="header-anchor" href="#selected" aria-label="Permalink to "selected""></a></h3><blockquote><p><strong>selected</strong>: <a href="https://vuejs.org/guide/typescript/composition-api.html#typing-ref" target="_blank" rel="noreferrer"><code>Ref</code></a><<code>undefined</code> | <code>T</code>, <code>undefined</code> | <code>T</code>></p></blockquote><h2 id="defined-in" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in" aria-label="Permalink to "Defined in""></a></h2><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/data/common.tsx#L509" target="_blank" rel="noreferrer">profectus/src/data/common.tsx:509</a></p>',24)]))}const f=t(n,[["render",c]]);export{p as __pageData,f as default};
|