I found maybe a bug or so in the nested views.
so my child view is a sortable table. but when i display the parent view and want to sort the table it doesn´t work.
You can see it under the Dashboard menu item and than choose "Bewerbungen" in the tabs.
I looked at your site and I can see that on the page in question there are JS errors in the console (screenshot).
I'm trying to isolate the problem so that I can reproduce it, but am having difficulty doing so.
On your site I inserted the parent View directly onto a page that is not designed with Elementor ("View: Jobs (parent)") and there are no JS errors.
So it seems to require Elementor. I am trying to reproduce your set up on my local Elementor test site, but you will know Elementor better than I do.
I added a static page which I design with Elementor.
I inserted a tabs module. I added a similar View (with a sortable table) to a tab, using the wpv-view shortcode.
That worked okay, no errors (you might want to try the same on your site).
But I notice that the way you inserted the View is by creating a section template and adding the View widget to it, then using this section template as the source for the tab content.
But I can't see how to do the same. If I add tabs I can only add WYSIWYG text content, I can't choose a template as the source for a tab.
That's the problem, on my install when I use the tabs module I can only enter text for the tab content, I can't choose a template, so I cannot reproduce the same setup you have to see if it generates the same error.
However, you confirm that if you insert the View directly into a tab via a shortcode (rather than adding the View to a section template which you then specify as the source of the tab) it works, correct?
However, you confirm that if you insert the View directly into a tab via a shortcode (rather than adding the View to a section template which you then specify as the source of the tab) it works, correct?
OK, I can escalate this to get to the bottom of the JS error, but I can only do so if I can reproduce the set up. Which I can't, because when I use a tab module the only content I can enter is with a WYSIWYG field, I cannot specify an Elementor section template as the source of the tab as you show.
That is with the current Elementor and Elementor Pro.
I asked two of my colleagues to check and they both found the same as me, the tab content is a WYSIWYG field, there is no option to use a template as the source for the tab.
Can you please provide exact steps for this, on a clean installation with only Elementor, Elementor Pro, Types and Views active, using the twentyseventeen theme?
can´t find any other elementor plugins installed. maybe thers some dead code from past installations.
so i would say my problem is solved.
i can paste the shortcode in and everything is fine. no js errors.
But the sorting does not work right. it does not sort after number or alphabet. (screenshots)
May be you can answer this question to my nested table, too.
I want to have the parent table sorted after the post date of the child.
Can i turn of the or ignore the sorting of the parent and only respect the newest child on the top?
I just created a quick test to confirm that there isn't a problem with sortable tables added to tabs in Elementor, and it works okay, as you can see in the screen recording.
So, I think we are back to the beginning.
This thread was split from one where Christian helped you with setting up the nested Views but which required adding custom code.
To clarify, the sorting is just on the child View results, is that correct?
I suspect the issue could be because you therefore have multiple sortable Views on the same page.
The easiest way to check would be for you to edit your parent View and add a limit of one, so we only get one parent result and therefore only one sortable table is added via the child View.
If you do that, does the sorting work for the single sortable table that you should now see?
here to answer your questions. The custom code from christian is not affecting the view.
so it is a simple nested view (child to parent). i tried some testing on a blank page without elementor at all.
there are the same problems. the sorting of the bootstrap table does not work right.
Explaination:
The parent view is only to have the relations of the current user.
So the current user is the author of the parent and another person is the author of the child.
With the nested view i can show all children related to the current users posts (parent).
Now the sorting is after the parent (newest parentpost on top). but i want to have it sorted after the newest childposts.
Yes, but are there multiple sortable Views on the same page?
Does the parent View return only one post, or multiple posts?
If the answer is multiple posts, could you please edit it and add a limit of 1 so that only a single sortable View appears on the page. Then check if that one sortable View functions as expected.
thanks for the hint i believe this was the problem.
I changed a few things (screenshots attached).
when i tried to to sort the child fields it shows everytime the nothing found view.