I believe this explanation may help you with st-safe-src:
1) You have a displayed collection (i.e. a repeater) that will be the result of sorting, filtering, slicing operations in the base collection.
2) When the initialized smart table creates a copy of the provided st-table collection as the base collection. Thus, sorting, filter, slice are based on the original asset. When called using ajax, you do not have a dataset during initialization so that the base copy is actually incorrect. As a node side, I would rather get data when resolving the dependency controller (i.e. resolving on the route), this will facilitate your unit tests
3) When using st-safe-src, you explicitly tell smart-table to view and update its base collection, that is, the one that it uses as a reference when sorting, filtering, and slicing.
Thus, basically the st-table is the displayed collection (result), and st-safe-src is the base collection (the original data set).
So, if you set both values ββto the same collection, the last one will be observed and the first will change, which will start the clock ... which will update the displayed text, etc.
Link: https://github.com/lorenzofox3/Smart-Table/issues/156#issuecomment-54242437
source share