CollectionFilter

CollectionFilter dùng để lọc Collection bằng nhiều điều kiện.

Cách dùng cơ bản

import { CollectionFilter } from '@nocobase/client-v2';

<CollectionFilter
  collection={collection}
  t={t}
  onChange={(filter) => {
    listRequest.run({ filter });
  }}
/>;

API

Tham sốKiểuMô tả
collection`Collectionundefined`
initialValueRecord<string, unknown>Giá trị filter ban đầu
onChange(filter) => voidCallback khi thay đổi
t(key, options?) => stringHàm dịch
filterableFieldNamesstring[]Danh sách field được phép
nonfilterableFieldNamesstring[]Danh sách field bị chặn
noIgnorebooleanBỏ qua giới hạn danh sách cho phép
buttonTextReact.ReactNodeVăn bản nút tùy chỉnh
showCountbooleanCó hiển thị số điều kiện hay không
popoverPropsPopoverPropsProps truyền cho Antd Popover
buttonPropsButtonPropsProps truyền cho Antd Button
popoverMinWidthnumberĐộ rộng tối thiểu của nội dung Popover

Liên kết liên quan