-
Notifications
You must be signed in to change notification settings - Fork 45
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
Advice for making strapselect work better inside an array with the new bootstrap decorator #63
Comments
According to elbunuelo in the linked issue json-schema-form/angular-schema-form-bootstrap#9, this seems to be because of a problem in ASF. Anyway, there seems to be a workaround in there, so I'll leave this open for to spread the information. Note: @davidlgj is on parental leave, I would be a bit careful with venturing into the unknown with the new decorator right now. Also, I tried ASFDS with the new decorator when deyceg released it, not sure why it doesn't work now. |
Hello thanks for the reply and maybe you can, altho elbueno workaround seems to be working atm the issue seems to be related with the new decorator builders from angular schema form bootstrap.
he's refering to the addMapping() the one ASF Dynamic select is using atm. So i've applied elbueno workaround plus changed the dynamic select decorators with the new method, applied the new builder from angular-schema-form-bootstrap and changed the templates from the dynamic select to use the sf-field-model (replaces the ngmodel with the correct path) and everything seems to be working properly at least for now. So if we had an oficial patch/branch to work with https://github.com/Textalk/angular-schema-form-bootstrap it would awesome since ASF seems to be heading that way. And btw great job with ASF dynamic plugin!! :) |
Can't you create a fork of the bootstrap decorator with the fix and a PR? Then people can just use the fork meanwhile? |
i can send it to you tomorrow after i get to work, because i just applied the change to strapselect and uiselect and i dont know if i've broke the filterTriggers feature or any other stuff. thus it's not "stable" enough for ppl start using. |
Just create a fork and link to it from here, then people can make their own decisions. |
will do tomorrow since atm i dont have my working laptop with me |
hello again here it's the link: to be able to save the modelValues inside a nestedArray we have to apply elbueno fix into schema-form.js. And i only applied the workaround to uiSelect and strapselect templateCache |
If anyone is still looking at this issue ... Thanks to mpina83 for doing this for uiselect and strapselect - I should have realised that this would not be trivial or I guess that it would have been done for everything? Happy to do a PR for this once I have it working - but before I do a deep dive (and a casual look has got me nowhere so far) is there something I am missing about the difficulty of doing this? |
I don't know, but please take a look if you can! |
I think I have stumbled upon one specific subset of this issue, even already with 0.8.14 which incorporates the fixes above, where selects are not rendered. It seems to me that the strapselect or the uiselect only work if they are the last and only one in the array. I have made a plunker exemplifying several situations: https://next.plnkr.co/plunk/wEXZs9SJ76AcFK6G |
Do you have a PR in mind?
Den tis 18 dec. 2018 18:48 skrev Sofia Paixão <[email protected]>:
… I think I have stumbled upon one specific subset of this issue, even
already with 0.8.14 which incorporates the fixes above, where selects are
not rendered. It seems to me that the strapselect or the uiselect only work
if they are the last *and* only one in the array. I have made a plunker
exemplifying several situations:
https://next.plnkr.co/plunk/wEXZs9SJ76AcFK6G
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#63 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AIPBJxNvqJMk_pEJNPLYwCNnf4z_apluks5u6SprgaJpZM4GmUvD>
.
|
I'm thinking of looking into it once I have the time and energy; for now I hoped isolating these behaviours in a plunker could be of help (for finding the root cause or for people looking to workarounds) |
I've upgraded to the recomended ASF bootstrap Decorator ( https://github.com/Textalk/angular-schema-form-bootstrap ) because of some issues working inside arrays and the destroyStrategy. Now the strapselect boxes dont render inside an array if we have more then one or dont work properly if i«ve just one(doesnt write the values in the model).
If i pick one standard select box and one strapselect the form will render but the filterTriggering stops working because it wont parse the arrayIndex value and thus the functionality of having two chained select boxes populating B values depending on select A values breaks.
Bellow i will link 2 plunker demos one working with the default ASF bootstrap decorator:
http://plnkr.co/edit/Ttxb3Icql42U8v3UrlIM?p=preview
and the last one not working with the recommended ASF bootstrap decorator:
http://plnkr.co/edit/xOlkiP7iN5vYekc7Kr8i?p=preview
ps:. you can switch the first strapselect type to just select to see the form rendering but it will still not get the triggers like it should.
It's worth to mentions was having a big problem before using select boxes nested inside array and this fix mentions here:
json-schema-form/angular-schema-form#590
(props to elbunuelo)
Solved some issued until now at least with the standard ASF select box.
The text was updated successfully, but these errors were encountered: