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

add enum autocomplite docs and example #235

Merged
merged 1 commit into from
Nov 8, 2022

Conversation

LukasBoll
Copy link
Contributor

closes #192

@sdirix sdirix mentioned this pull request Sep 21, 2022
16 tasks
@sdirix sdirix requested a review from lucas-koehler October 4, 2022 07:34
Copy link
Contributor

@lucas-koehler lucas-koehler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! The oneOf example should actually use oneOf (copy paste mistake? :D ). Besides that it already looks pretty good.

properties: {
autocompleteOneOf: {
type: 'string',
enum: ['foo', 'bar', 'foobar']
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The oneOf example should actually use an oneOf instead of an enum


import { AutocompleteEnum, AutocompleteOneOf } from '../../src/components/docs/multiple-choice';

The following examples display the autocomplete renderer. A autocomplete renderer can be achieved by using an `enum` or an `oneOf` in the JSON schema and setting the `autocomplete` option in the UI schema.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The following examples display the autocomplete renderer. A autocomplete renderer can be achieved by using an `enum` or an `oneOf` in the JSON schema and setting the `autocomplete` option in the UI schema.
The following examples display the autocomplete renderer.
The autocomplete renderer is used by specifying an `enum` or an `oneOf` in the JSON schema and setting the `autocomplete` option in the UI schema.

@@ -72,6 +73,24 @@ Both `enum` and `oneOf` support the option to use radio buttons instead of a dro

<RadioGroup />

### Autocomplete Option

There is also the option to use the autocomplete renderer. The autocomplete renderer is available for data of type `enum` and `oneOf` and will be rendered by using the `autocomplete` option in the UI schema:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
There is also the option to use the autocomplete renderer. The autocomplete renderer is available for data of type `enum` and `oneOf` and will be rendered by using the `autocomplete` option in the UI schema:
There is also the option to use the autocomplete renderer.
The autocomplete renderer is available for data of type `enum` and `oneOf` and is rendered by using the `autocomplete` option in the UI schema:

closes eclipsesource#192

Signed-off-by: Lukas Boll lukas-bool@web.de
Copy link
Contributor

@lucas-koehler lucas-koehler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LukasBoll Thanks for the updates. LGTM now :)

@lucas-koehler lucas-koehler merged commit 904f61d into eclipsesource:master Nov 8, 2022
@sdirix sdirix mentioned this pull request Jan 9, 2024
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add autocomplete example and docs
2 participants