mirror of
https://github.com/livebook-dev/livebook.git
synced 2024-11-17 13:27:50 +08:00
663ec3283e
* Prototype standalone mode with mix * Move runtime initialization into separate LiveViews * Make standalone node initialization async * Refactor async node initialization * Automatically scroll to the bottom of output * Refactor streaming output * Move MessageEmitter under Utils * Add path selector to the mix runtime picker * Update runtime descriptions * Add successful or error message at the end of output * Run formatter * Rename Standalone to ElixirStandalone for consistency * Show only directories when looking for a mix project * Update docs * Extract shared standalone logic * Make the remote primary process monitor Manager instead of session * Further refactoring and docs * Add tests for collectable Callback * Add missing macro doc * Apply review suggestions * Decouple sending asynchronous notifications from the runtime initialization * Apply suggestions
19 lines
304 B
JavaScript
19 lines
304 B
JavaScript
/**
|
|
* A hook used to scroll to the bottom of an element
|
|
* whenever it receives LV update.
|
|
*/
|
|
const ScrollOnUpdate = {
|
|
mounted() {
|
|
this.__scroll();
|
|
},
|
|
|
|
updated() {
|
|
this.__scroll();
|
|
},
|
|
|
|
__scroll() {
|
|
this.el.scrollTop = this.el.scrollHeight;
|
|
},
|
|
};
|
|
|
|
export default ScrollOnUpdate;
|