Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SearchBar] Dates, Booleans, Numbers and Range Clauses #485

Merged
merged 1 commit into from
Mar 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# [`master`](https://github.com/elastic/eui/tree/master)

- Relaxed query syntax of `EuiSearchBar` to allow usage of hyphens without escaping ([#581](https://github.com/elastic/eui/pull/581))
- Added support for range queries in `EuiSearchBar` (works for numeric and date values) ([#485](https://github.com/elastic/eui/pull/485))
- Add support for expandable rows to `EuiBasicTable` ([#585](https://github.com/elastic/eui/pull/585))

# [`0.0.35`](https://github.com/elastic/eui/tree/v0.0.35)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"html-webpack-plugin": "^2.30.1",
"jest": "^22.0.6",
"jest-cli": "^22.0.6",
"moment": "2.19.3",
"moment": "^2.20.1",
"node-sass": "^4.5.3",
"npm-run": "^4.1.2",
"pegjs": "^0.10.0",
Expand Down
54 changes: 54 additions & 0 deletions src-docs/src/views/search_bar/props_info.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,60 @@ export const propsInfo = {
required: false,
defaultValue: { value: 'false' },
type: { name: 'boolean' }
},
schema: {
description: 'A schema describing the supported fields and flags',
required: false,
type: { name: '#Schema' }
}
}
}
},

Schema: {
__docgenInfo: {
_euiObjectType: 'type',
props: {
strict: {
description: 'Indicates whether the query parsing should be strictly compliant with the schema',
required: false,
defaultValue: { value: 'false' },
type: { name: 'boolean' }
},
flags: {
description: 'A list of supported flags',
required: false,
type: { name: 'string[]' }
},
fields: {
description: 'A dictionary of supported fields',
required: false,
type: { name: '{ [fieldName]: #SchemaField }' }
}
}
}
},

SchemaField: {
__docgenInfo: {
_euiObjectType: 'type',
props: {
type: {
description: 'The data type of the field',
required: true,
type: { name: 'boolean | string | date | number' }
},
valueDescription: {
description: 'A description of the values accepted by this field',
required: false,
defaultValue: { value: 'the data type' },
type: { name: 'string' }
},
validate: {
description: 'A function to validate a possible value for the field. An error should be thrown when ' +
'validation fails (with appropriate error message of course)',
required: false,
type: { name: '(value) => void' }
}
}
}
Expand Down
Loading