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

Allow checkbox input type in prompt dialog #1980

Merged
merged 4 commits into from
Mar 12, 2020

Conversation

superruzafa
Copy link
Contributor

@superruzafa superruzafa commented Mar 3, 2020

This PR allows the Prompt modal dialog to show <input type="checkbox"> elements.

You only have to call it by setting inputType to checkbox. You can also set defaultValue to false/true to uncheck/check the checkbox, respectively.

The modal will return the string value "true" if the the checkbox was checked and "false" otherwise.

imagen.

Copy link
Contributor

@develohpanda develohpanda left a comment

Choose a reason for hiding this comment

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

Hi @superruzafa! Thanks for putting up this PR; LGTM! Just one suggestion regarding spacing, and then good to go!

In the future it would be nice to update the onComplete callback to accept the true type (boolean, integer, string), but this is good for now. 😃

Copy link
Contributor Author

@superruzafa superruzafa left a comment

Choose a reason for hiding this comment

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

That's exactly what I was looking for :)

packages/insomnia-app/app/ui/css/components/forms.less Outdated Show resolved Hide resolved
Copy link
Contributor

@develohpanda develohpanda left a comment

Choose a reason for hiding this comment

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

Nice one, thanks! 🎉

@develohpanda develohpanda changed the title allow checkboxes input fields in prompt dialog Allow checkbox input type in prompt dialog Mar 12, 2020
@develohpanda develohpanda merged commit e0d20e5 into Kong:develop Mar 12, 2020
@superruzafa superruzafa deleted the allow-prompt-checkboxes-fields branch March 12, 2020 23:29
@nijikokun nijikokun added this to the 2020.1.4 milestone May 28, 2020
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.

3 participants