Ghost/ghost/admin/app/components/gh-nav-menu.js
Kevin Ansfield b71babfc51 Updated Ember dependencies to 3.22 (#2220)
no issue

- bumped `ember-source`, `ember-data`, and `ember-cli` to latest 3.22.x versions
- fixed errors caused by updating properties inside of a render
  - `<GhPublishMenu>` removed insta-call of `@setSaveType` when rendering sub-components in favour of pre-setting the default `@saveType` value when the underlying post status changes
  - updated `<GhNavMenu>` to use the run-loop to update the `firstRender` property once rendering has finished rather than mid-render
2022-01-22 00:05:05 +00:00

20 lines
494 B
JavaScript

import Component from '@glimmer/component';
import {action} from '@ember/object';
import {schedule} from '@ember/runloop';
import {inject as service} from '@ember/service';
import {tracked} from '@glimmer/tracking';
export default class GhNavMenuComponent extends Component {
@service settings;
@service ui;
@tracked firstRender = true;
@action
updateFirstRender() {
schedule('afterRender', this, () => {
this.firstRender = false;
});
}
}