Add power search docs
Reviewed By: antonk52 Differential Revision: D50170852 fbshipit-source-id: 36b07d70ab136cc3e0165473c784bf14f0bff302
This commit is contained in:
committed by
Facebook GitHub Bot
parent
2edcb29e46
commit
a3383f1f6d
13
docs/extending/power-search.mdx
Normal file
13
docs/extending/power-search.mdx
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
---
|
||||||
|
id: power-search
|
||||||
|
title: Power Search
|
||||||
|
sidebar_label: Power Search
|
||||||
|
---
|
||||||
|
|
||||||
|
By default, your [table](../tutorial/js-table.mdx) has a power search bar. It allows to search through the entire row as a serialized string or through individual columns. Based on the column type, power search provides different search operators for columns.
|
||||||
|
For instance, for string values it can check if a string contains a substring or even matches some other string exactly. At the same time, for dates Flipper can filter out records after or before a certain date.
|
||||||
|
Since Flipper does not have a way of identifying the column type in advance, it always assumes that every column is a string. If you want you can tell Flipper how to handle a column and what power search operators should be available.
|
||||||
|
|
||||||
|
You can see a live example of how you can provide the power search config [here](https://fburl.com/code/rrxj86e5).
|
||||||
|
|
||||||
|
You can find the complete list of supported operators [here](https://github.com/facebook/flipper/blob/main/desktop/flipper-plugin/src/ui/data-table/DataTableDefaultPowerSearchOperators.tsx).
|
||||||
@@ -124,6 +124,7 @@ module.exports = {
|
|||||||
{
|
{
|
||||||
'Desktop Plugin APIs': [
|
'Desktop Plugin APIs': [
|
||||||
'extending/flipper-plugin',
|
'extending/flipper-plugin',
|
||||||
|
'extending/power-search',
|
||||||
'extending/styling-components',
|
'extending/styling-components',
|
||||||
'extending/style-guide',
|
'extending/style-guide',
|
||||||
'extending/deeplinks',
|
'extending/deeplinks',
|
||||||
|
|||||||
Reference in New Issue
Block a user