-
Notifications
You must be signed in to change notification settings - Fork 243
-
Notifications
You must be signed in to change notification settings - Fork 243
Support for dynamic tab-content #18
Comments
Hi @vl4d I think I know why the issue appears. On mobile right know but I will look into it today. |
@vl4d Can you take a look at this fiddle https://jsfiddle.net/CristiJ/bt5dhqtf/497/
|
@cristijora thanks for the quick response, and based on your questions i'd say:
The good thing is that the developer could validate the information and force the user to go back to step is deemed invalid. That is, can't finish the wizard unless all steps are valid. I can see why you made it concrete steps. I had changed my implementation to select steps before even starting the wizard, since this feature wasn't available. I did testing using this fiddle: https://jsfiddle.net/bt5dhqtf/502/ |
Sorry for late response on this. I will most likely rewrite the wizard in jsx. Currently I'm a bit limited of rendering dynamic content from slots and don't have as much control over that as I have with render functions and jsx. I have tried implementing this but it very quickly got dirty and uncontrollable. This might take 2-3 weeks until I find time to port the wizard to jsx and consider this functionality again. Hope that's fine |
This is the only point which I have not addressed yet since it's rather hard to detect where a step was added. If you have any ideas, please let me know. Kind of stuck on it. |
@cristijora Regarding your comment 312689794. |
@exnihilo-creatio Thanks for the idea. I sort of improved this with a new internal implementation but I still feel that it doesn't work as expected mainly due to the fact that different array operations (shift, pop etc) can cause multiple additions/removals which in the end provides inconsistent results. Don't know if hashing would help too much here but I could give a try. |
The idea for the hash is to find out which tabs are currently being tracked. Once the array has been changed you loop over the new tabs and check which hashes are not present in the interal hash cache. Those not present are new tabs, and from the loop you can know the position of newly added tabs. After checking for new tabs, you can loop and check for removed tabs and update indexes hereafter. It might be benificial to try and complete both steps in the same loop. Hopefully using these steps the type of array operation is not important. |
@exnihilo-creatio Do you have the desire to do a PR 😄 ? You could add a watch property for
And potentially adjust |
@cristijora Yes, but I can't guarantee a timeline, I'm swamped with work the coming weeks. |
@exnihilo-creatio No worries about that. I would be grateful for the help regardless of timeline |
Sorry for the delay. (finals came up) |
@vl4d Would be happy to see a working concept :) |
Any more feedback on this issue? I'd be keen to have the ability to dynamically insert tabs based on the current tabs status. I'd only need to add/remove tabs in front of the current one, not behind. |
@un-matthewdavis This is partially supported. It might not work as expected in some situations. It should be more or less reliable when you use an array to generate all steps rather then combine static html + a v-for See this example as a reference https://jsfiddle.net/bt5dhqtf/1185/ |
Hi @cristijora , I want to dynamically generate step component,but I got a problem when I verified.I do not know how to verify(checkbox and radiobox). I've seen you write ReadMe.md,I have more style in my vue file, This is my demo https://jsfiddle.net/YoungHarry/Lsmjrpeq/10/ |
Hi @zhang-yafei Is to add Another option would be
Based on that you can access your |
Thank you.I will try to solve it.Thanks again for your reply. |
Closing this since it's out of scope for now. |
see the link https://jsfiddle.net/bt5dhqtf/502/ The only step I have remove that it should be returned only.In same posotion |
Hey I have been playing around with your wizard, and I would love to update the number of tab-contents on the fly (managed by an array) depending on user preference the wizard would lengthen or shorten.
Here is a fiddle with what I would like to do. The remove first item button, though doesnt seem to remove the corresponding tab-content as I'd expect.
https://jsfiddle.net/bt5dhqtf/482/
Please let me know if this is the expected behaviour.
The text was updated successfully, but these errors were encountered: