Problem

After adding new note to collection it appears on the bottom of the page and than, after short delay, moves to the top (where it should appear in the first place because it is the newest one).

How to make it appear on the top immediately?

Solution

Apparently it happened because new note was shown before getting information back from the server. CreatedAt property is set on the backend, so during short time when waiting for backend response it has the value of null and is placed on the bottom of the page.

Solution to this is to sort only saved notes, ommiting those with isNew property.

Keep in mind that there will be a short delay between clicking "Save" and displaying new note on the list because of it, so you should consider making UI changes accordingly. For example, you may disable "Save" button or display "Note is saving..." message to the user.