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

Boolean AutoField returns empty string #88

Closed
mstanuch opened this issue Aug 3, 2016 · 3 comments
Closed

Boolean AutoField returns empty string #88

mstanuch opened this issue Aug 3, 2016 · 3 comments
Assignees
Labels
Type: Bug Bug reports and their fixes

Comments

@mstanuch
Copy link

mstanuch commented Aug 3, 2016

Using schema:

const ExampleSchema = new SimpleSchema({
    boolValue: {
        type: Boolean,
        optional: true
    }
});

I've created full form by AutoForm:

const FullAutoForm = () => 
    <AutoForm schema={ExampleSchema} onSubmit={(doc) => console.log(doc)} />
;

I haven't checked a checkbox, after submit I've got {boolValue: ''} (empty string).

@radekmie radekmie added the Type: Bug Bug reports and their fixes label Aug 3, 2016
@radekmie radekmie self-assigned this Aug 3, 2016
@radekmie
Copy link
Contributor

radekmie commented Aug 3, 2016

It mean, that nobody is using fully automatic AutoForm :D

Okay, I'll take care of this.

@serkandurusoy
Copy link
Contributor

Hmm, do you think maybe we should consider this a sign to "unpromote" this
feature for the 1.0 release, making it an undocumented private api that can
be deprecated in the future?

This way, if there really is not much use for it, we can make uniforms even
leaner, concentrating our efforts on what matters the most.

And imho, anyone dealing with forms would either eventually want to fine
tune what's enclosed within the autoform tags or at least not be bothered
by the fact that defining a form requires defining its fields within the
jsx markup, since you know, it is what everyone is already used to doing
anyway. In fact, perhaps full autoform is an unexpected feature for most
people and they might even find it unreliable, and be better of defining
explicit markup!

On Wed, Aug 3, 2016 at 10:35 AM, Radosław Miernik notifications@github.com
wrote:

It mean, that nobody is using fully automatic AutoForm :D

Okay, I'll take care of this.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#88 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AEbz3OXvjGCzmxuGZmAiLOz9tgjXMGNQks5qcETDgaJpZM4JbYH_
.

@radekmie
Copy link
Contributor

radekmie commented Aug 3, 2016

To be honest - no. I've also encountered this before, but since then I always provided an initial model.

I thought about it at the beginning, but there are some cases when it's a lot simpler. For example - your schema is generated (by a GUI editor or from simple textual definition) - then you have either to use full AutoForm or to extend your GUI editor to handle it.

I don't think, that any feature right now should be unpromoted (or treated as legacy) - those are obvious to come.

@Monteth Monteth added this to Closed in Open Source (migrated) Jul 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Bug reports and their fixes
Projects
Archived in project
Development

No branches or pull requests

3 participants