-
Notifications
You must be signed in to change notification settings - Fork 649
Expand collapsed arrays on schema validation error #329
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
Comments
Interesting... maybe you could wrap each accordions fields inside an |
Funnily enough @davidlgj I was just coming back to let you know how I got on. And thats exactly what I did. Heres the gist https://gist.github.com/deyceg/84cd2428a6c8291de66a awesome work btw! |
👍 Nice! Love to see an add-on of it if you get time ;) |
@davidlgj Definately! It'll be the weekend after easter though as I'm a little snowed under with a client at the moment with a deadline approaching! I have a couple of other useful extensions too but I'll keep those a surprise! |
Ooooh cool! let, me now if I can help! |
@davidlgj Didn't want to create a new issue, but have some additional discussion along similar lines. I'm working on an modal type where we can take a fieldset out of the form and place it inside a modal window with its own schema-form lifecycle. Must admit I havent got very far yet although I did something similar with my own form controls a while back without the desired flexibility we'd need here though. My current trail of thought is to wait for the fieldset to be rendered, then move the dom element into the modal whilst somehow keeping it bound to the original scope (read: transclusion). The issues I'm running into however are two-fold:
Any ideas/thoughts appreciated :) |
Why not just render the form again inside the modal and then hide the other? Since they both bind against the same model that should work. Moving the DOM nodes around seems tricky... sorry I don't think I have any better answer :) |
@Anthropic I did create schema-form-modal although I havent published it! Heres the component:
Whoops, this is why I properly should have opened a new issue! You were referencing the accordion issue :) I didnt publish anything but I did get it working but creating two components and using ui bootstraps accordion component. Gist: https://gist.github.com/deyceg/6a3bfe870f258ef839b3aaf6b1c5a912 |
@deyceg thanks for that! :) |
@Anthropic No problem! FYI I was using 0.8.x of schema-form! |
Can any help me integrating and using https://gist.github.com/deyceg/6a3bfe870f258ef839b3aaf6b1c5a912 in my project? |
Maybe not an issue; but curious to if anyones done something similar/has any ideas.
I've created a custom array type that uses bootstrap accordions. Works great. However, when the submit button validates the form, the accordion remains collapsed even though it contains invalid form fields
I would like to somehow get the offending accordion to automatically expand.
I thought about creating an attr directive that sits on the accordion that listens for an event, and has access to the AccordionController from bootstrap. With the $index I could call toggleOpen().
Thoughts?
The text was updated successfully, but these errors were encountered: