CollectionFilterPanel

CollectionFilterPanel は、Collection フィルターパネルをページに埋め込むためのコンポーネントです。

基本的な使い方

import { CollectionFilterPanel, type CollectionFilterPanelRef } from '@nocobase/client-v2';

const ref = useRef<CollectionFilterPanelRef>(null);

<CollectionFilterPanel ref={ref} collection={collection} t={t} />;

const filter = ref.current?.getFilter();

API

パラメータ説明
collection`Collectionundefined`
initialValueRecord<string, unknown>初期 filter 値
onChange(filter) => void値変更時のコールバック
t(key, options?) => string翻訳関数
filterableFieldNamesstring[]フィールドの許可リスト
nonfilterableFieldNamesstring[]フィールドのブロックリスト
noIgnoreboolean許可リスト制限をスキップする

メソッド

メソッド説明
getFilter()Get the compiled filter
reset()Clear all conditions

関連リンク