From 7b7b626bfaebbd49c9e2976a49893da1ebf227d4 Mon Sep 17 00:00:00 2001
From: Chandler Prall
Date: Mon, 11 Feb 2019 12:07:34 -0700
Subject: [PATCH] Fix EuiSearchBar's proptype docs around
FieldValueToggleGroupFilter (#1551)
---
src-docs/src/views/search_bar/props_info.js | 25 ++++++++++++++++++-
.../views/search_bar/search_bar_example.js | 14 +++++------
2 files changed, 30 insertions(+), 9 deletions(-)
diff --git a/src-docs/src/views/search_bar/props_info.js b/src-docs/src/views/search_bar/props_info.js
index fc9bea07463..23049a82162 100644
--- a/src-docs/src/views/search_bar/props_info.js
+++ b/src-docs/src/views/search_bar/props_info.js
@@ -318,7 +318,7 @@ export const propsInfo = {
items: {
description: 'A list of field value filters that are part of this group',
required: true,
- type: { name: '#FieldValueToggleGroupItem[]' }
+ type: { name: '#FieldValueToggleGroupFilterItemType[]' }
},
available: {
description: 'Called to check whether this filter is currently available. If not, it will not be shown',
@@ -329,6 +329,29 @@ export const propsInfo = {
}
},
+ FieldValueToggleGroupFilterItemType: {
+ __docgenInfo: {
+ _euiObjectType: 'type',
+ props: {
+ value: {
+ description: 'Value of the filter item',
+ required: true,
+ type: { name: 'string | number | boolean' }
+ },
+ name: {
+ description: 'Name rendered on the filter button',
+ required: true,
+ type: { name: 'string' }
+ },
+ negatedName: {
+ description: 'Name rendered on the filter button when its value is negated in the query',
+ required: false,
+ type: { name: 'string' }
+ },
+ }
+ }
+ },
+
ExecuteQueryOptions: {
__docgenInfo: {
_euiObjectType: 'type',
diff --git a/src-docs/src/views/search_bar/search_bar_example.js b/src-docs/src/views/search_bar/search_bar_example.js
index bd08636cb80..17d541c61d6 100644
--- a/src-docs/src/views/search_bar/search_bar_example.js
+++ b/src-docs/src/views/search_bar/search_bar_example.js
@@ -109,11 +109,11 @@ export const SearchBarExample = {
created:'2019-01-01',
created>='3rd January 2017'
-
+
Formats understood by the parser
-
+
),
props: propsInfo,