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

Update InlineInput to allow undefined value prop #15

Closed
1 task
yaelleC opened this issue Mar 18, 2022 · 1 comment
Closed
1 task

Update InlineInput to allow undefined value prop #15

yaelleC opened this issue Mar 18, 2022 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@yaelleC
Copy link
Contributor

yaelleC commented Mar 18, 2022

Description

Currently, the InlineInput has a compulsory prop value that is a string.
If we want to render an input that has no value, we have to send it an empty string. It would be best to have the option to pass undefined or no value at all

Code

export interface InlineInputProps extends DataSourcePluginOptionsEditorProps<{}, AwsAuthDataSourceSecureJsonData> {
value: string;
onChange: (e: FormEvent<HTMLInputElement>) => void;
label?: string;
tooltip?: string;
placeholder?: string;
'data-testid'?: string;
hidden?: boolean;
disabled?: boolean;
}

Acceptance criteria:

  • The following code can be ran even if clusterIdentifier does not exist:
<InlineInput
        {...props}
        value={props.options.jsonData.clusterIdentifier}
/>
@fridgepoet
Copy link
Member

We've decided not to work on this one for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
Archived in project
Development

No branches or pull requests

2 participants