No refresh after Create AJAX return is correct
No refresh after Create AJAX return is correct

I just upgraded to the latest version of everything.
Pretty smooth except for one issue...
I have Buttons working, and extend: "create".
It works with Editor and all is well, but...
After creating you need to reload the page to see it.
I also have bubble-editing that works fine and updates the table properly.
I have compared the returned AJAX from the PHP libs, and they are the same...
An edit to row_3 returns the entire row.
An create of row_4 returns the entire row (exact same) but it is not added to the table.
What am I missing here?
This question has an accepted answers - jump to answer
Answers
Buttons snippet
Is this the culprit? No, it is getting saved fine.
Why doesn't the table refresh?
Row3 edit (works):
Row4 new (doesn't):
Hi @rpmccormick ,
The problem is likely to be that the server isn't responding with what the client expects. Can you post the JSON returned from the server after the creation, please.
I'm surprised this broke with the upgrade, since the communication protocol hasn't changed in a while.
Cheers,
Colin
It is not necessarily because of the upgrade, it is a new project as well, I just didn't encounter it on older projects with older versions (though most of the old code has been portable).
I did post the JSON returned from the server above... it is Row 4 in my original post. Editing works fine, bubble-editing works fine, create Button doesn't (I am new to Buttons instead of TableTools). It does work other than not updating the table, even though it returns Row 4 (see OP). A page reload shows the new row just fine.
Thanks for the help.
Its because of this:
drawType: 'page'
.A
page
draw will not updating filtering or sorting, so the new data wouldn't be shown. It would work with editing since the data is already present.What you could do is:
not ideal - we might need a way to split the draw type down by operation, but that should workaround it.
Allan
Thanks Allan. That is funny, I only added the "main:" form option because otherwise I am getting a blank header and no OK button.
Now I have found that use the "main:" form option applies it to both Edit and Remove so that doesn't really work. Again, without it, the Remove popup is completely blank (header / bodytext / no buttons).
Everything is a fresh install all-in-one package newest version, but I still have the same issue.
How do I get the default language back? (or how do I set a different header/buttons for Remove in addition to Edit?) I'm sure it is all in your awesome docs, it is just on my todo list and funny it was the cause of this issue.
That would happen if you are using
create()
/edit()
without then specifying theform-options
for the header / buttons or using thetitle()
/buttons()
methods. So for example you might do:But in your first post you say you are using
extend: 'create'
so I'm not actually sure what would cause this. Can you link to a page showing the issue please?Allan