1 line
4.2 KiB
JavaScript
1 line
4.2 KiB
JavaScript
import{_ as t,c as a,a0 as r,o}from"./chunks/framework.P9qPzDnn.js";const h=JSON.parse('{"title":"Function: getFirstFeature()","description":"","frontmatter":{"editLink":false},"headers":[],"relativePath":"api/features/feature/functions/getFirstFeature.md","filePath":"api/features/feature/functions/getFirstFeature.md","lastUpdated":null}'),n={name:"api/features/feature/functions/getFirstFeature.md"};function s(i,e,l,c,u,d){return o(),a("div",null,e[0]||(e[0]=[r('<p><a href="./../../../">Profectus</a> / <a href="./../">features/feature</a> / getFirstFeature</p><h1 id="function-getfirstfeature" tabindex="-1">Function: getFirstFeature() <a class="header-anchor" href="#function-getfirstfeature" aria-label="Permalink to "Function: getFirstFeature()""></a></h1><blockquote><p><strong>getFirstFeature</strong><<code>T</code>>(<code>features</code>, <code>filter</code>): <code>object</code></p></blockquote><p>Utility function for taking a list of features and filtering them out, but keeping a reference to the first filtered out feature. Used for having a collapsible of the filtered out content, with the first filtered out item remaining outside the collapsible for easy reference.</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> <em>extends</em> <a href="./../../../util/vue/interfaces/VueFeature"><code>VueFeature</code></a></p><h2 id="parameters" tabindex="-1">Parameters <a class="header-anchor" href="#parameters" aria-label="Permalink to "Parameters""></a></h2><h3 id="features" tabindex="-1">features <a class="header-anchor" href="#features" aria-label="Permalink to "features""></a></h3><p><code>T</code>[]</p><p>The list of features to search through</p><h3 id="filter" tabindex="-1">filter <a class="header-anchor" href="#filter" aria-label="Permalink to "filter""></a></h3><p>(<code>feature</code>) => <code>boolean</code></p><p>The filter to use to determine features that shouldn't be collapsible</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>An object containing a ref to the first filtered <em>out</em> feature, a render function for the collapsed content, and a ref for whether or not there is any collapsed content to show</p><h3 id="collapsedcontent" tabindex="-1">collapsedContent() <a class="header-anchor" href="#collapsedcontent" aria-label="Permalink to "collapsedContent()""></a></h3><blockquote><p><strong>collapsedContent</strong>: () => <a href="./../../../util/vue/type-aliases/Renderable"><code>Renderable</code></a></p></blockquote><h4 id="returns-1" tabindex="-1">Returns <a class="header-anchor" href="#returns-1" aria-label="Permalink to "Returns""></a></h4><p><a href="./../../../util/vue/type-aliases/Renderable"><code>Renderable</code></a></p><h3 id="firstfeature" tabindex="-1">firstFeature <a class="header-anchor" href="#firstfeature" aria-label="Permalink to "firstFeature""></a></h3><blockquote><p><strong>firstFeature</strong>: <a href="https://vuejs.org/guide/typescript/composition-api.html#typing-ref" target="_blank" rel="noreferrer"><code>Ref</code></a><<code>T</code> | <code>undefined</code>></p></blockquote><h3 id="hascollapsedcontent" tabindex="-1">hasCollapsedContent <a class="header-anchor" href="#hascollapsedcontent" aria-label="Permalink to "hasCollapsedContent""></a></h3><blockquote><p><strong>hasCollapsedContent</strong>: <a href="https://vuejs.org/guide/typescript/composition-api.html#typing-ref" target="_blank" rel="noreferrer"><code>Ref</code></a><<code>boolean</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/features/feature.ts#L92" target="_blank" rel="noreferrer">profectus/src/features/feature.ts:92</a></p>',26)]))}const p=t(n,[["render",s]]);export{h as __pageData,p as default};
|