I’m using the latest versions of Ember and Ember-Data with a small API to learn.
I have Ember display a table with elements and there’s an option to delete a record.
Delete works fine, except the table doesn’t get updated. I’ve tried with transitionToRoute(‘index’) but nothing happens.
@xBlack this looks generally correct, but is missing the part of the code that triggers the removal. Could you recreate the issues in a jsbin for us? http://emberjs.jsbin.com/ If you can do that I think the cause could be tracked down pretty quickly.
As I said, the action triggers fine and the record is deleted properly.
I’m not sure if I can create the jsbin because I’m using the RESTAdapter and because the confirmation button is on a modal, so it’s more complex.
I’m using the bootstrap modal to ask for confirmation before deleting. I can’t get the modal to work on jsbin or jsfiddle. But this is the idea: http://emberjs.jsbin.com/dolasuto/8/edit and maybe it helps. Thanks a lot mixonic.
I haven’t been able to fix this problem. Moreover, today I run into a similar issue.
I have a search box where a user can enter something and search. It works fine the first time, but the second the view does not get refreshed but I can see the data coming if I use {{log this}}. Obviously, I must be doing something wrong. (It works if I have the Ember Extension open - I guess it forces the refresh).
The workflow of this is as follows:
From the Index go to Client. Here there is an search box. Enter something and press a button.
Button has action ‘search’ which is defined in ClientController which does transitionToRoute('client.search').
The route client.search only has
What am I missing?
Why is the data retrieved but the view not updated?
(I’ve already tried to create a jsbin with this, but I can never get it to work at all.)
Can anyone explain why this fixes the issue?
I was able to find the solution after noticing that if I opened Ember Inspector and clicked on the Routes tab, the search would magically work.