Skip to content

Commit

Permalink
Update AdvancedSearch prop documentation (#2207)
Browse files Browse the repository at this point in the history
  • Loading branch information
ncovercash authored Jan 19, 2024
1 parent 6510a62 commit b65b727
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/AdvancedSearch/AdvancedSearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import defaultRowFormatter from './utilities/defaultRowFormatter';
import { ROW_COUNT } from './constants';

const propTypes = {
children: PropTypes.func.isRequired,
children: PropTypes.func,
defaultSearchOptionValue: PropTypes.string,
firstRowInitialSearch: PropTypes.shape({
option: PropTypes.string,
Expand Down
6 changes: 3 additions & 3 deletions lib/AdvancedSearch/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ onSearch | func | Callback fired when search is performed. Called with two argum
onCancel | func | Callback fired when the user clicks the cancel button. | true
defaultSearchOptionValue | string | One of the options in `searchOptions` that will be selected by default in all rows | false
firstRowInitialSearch | object | Object with shape `{ query, option }` - will be used to populate first row with default values | false
hasMatchSelection | boolean | Show/hide search match option dropdown | true
hasQueryOption | boolean | Controls whether `Query` search option should be appended to search options list | true
hasMatchSelection | boolean | Show/hide search match option dropdown | false
hasQueryOption | boolean | Controls whether `Query` search option should be appended to search options list | false
rowFormatter | func | Function that will be used to combine boolean, query and search option of each row. Signature: `(searchOption, query, bool, comparator) => {...}`. Returned values will be used by `queryBuilder` to join them together. *Note:* no need to add `bool` to resulting string here - it will be added by `queryBuilder`. | false
queryBuilder | func | Function that will be used to construct the search query. Signature: `(rows, rowFormatter) => {...}`. `rows` - array of shapes `{ query, searchOption, query }`, `rowFormatter` - the prop. Returned value will be passed as the first argument to `onSearch`. | false
queryToRow | func | Function that will be used to parse a query string into a row object. | false
Expand Down Expand Up @@ -180,4 +180,4 @@ const SearchRoute = (...) => {
return (...);
}

```
```

0 comments on commit b65b727

Please sign in to comment.