profectus-docs/assets/api_features_feature_functions_getFirstFeature.md.D3eG0H4V.js

1 line
4.2 KiB
JavaScript
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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 &quot;Function: getFirstFeature()&quot;"></a></h1><blockquote><p><strong>getFirstFeature</strong>&lt;<code>T</code>&gt;(<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 &quot;Type Parameters&quot;"></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 &quot;Parameters&quot;"></a></h2><h3 id="features" tabindex="-1">features <a class="header-anchor" href="#features" aria-label="Permalink to &quot;features&quot;"></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 &quot;filter&quot;"></a></h3><p>(<code>feature</code>) =&gt; <code>boolean</code></p><p>The filter to use to determine features that shouldn&#39;t be collapsible</p><h2 id="returns" tabindex="-1">Returns <a class="header-anchor" href="#returns" aria-label="Permalink to &quot;Returns&quot;"></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 &quot;collapsedContent()&quot;"></a></h3><blockquote><p><strong>collapsedContent</strong>: () =&gt; <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 &quot;Returns&quot;"></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 &quot;firstFeature&quot;"></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>&lt;<code>T</code> | <code>undefined</code>&gt;</p></blockquote><h3 id="hascollapsedcontent" tabindex="-1">hasCollapsedContent <a class="header-anchor" href="#hascollapsedcontent" aria-label="Permalink to &quot;hasCollapsedContent&quot;"></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>&lt;<code>boolean</code>&gt;</p></blockquote><h2 id="defined-in" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in" aria-label="Permalink to &quot;Defined in&quot;"></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};