diff --git a/.eslintrc.js b/.eslintrc.js index eb830475b5..8dfc64bb67 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -87,7 +87,7 @@ module.exports = { 'ember/no-classic-components': 'off', 'ember/no-actions-hash': 'off', 'ember/no-component-lifecycle-hooks': 'off', - 'ember/no-string-prototype-extensions': 'off', + 'ember/no-string-prototype-extensions': 'error', 'ember/require-super-in-lifecycle-hooks': 'off', 'ember/no-controller-access-in-routes': 'off', 'ember/no-private-routing-service': 'off', diff --git a/app/components/container/form-upgrade/component.js b/app/components/container/form-upgrade/component.js index 8f5f46866d..e2fe0037cc 100644 --- a/app/components/container/form-upgrade/component.js +++ b/app/components/container/form-upgrade/component.js @@ -1,6 +1,7 @@ import Component from '@ember/component'; import layout from './template'; import { get, computed } from '@ember/object'; +import { dasherize } from '@ember/string'; export default Component.extend({ layout, @@ -27,6 +28,6 @@ export default Component.extend({ }), componentName: computed('scaleMode', function() { - return `container/form-upgrade-${ get(this, 'scaleMode').dasherize() }`; + return `container/form-upgrade-${ dasherize(get(this, 'scaleMode')) }`; }), }); diff --git a/app/components/form-scoped-roles/component.js b/app/components/form-scoped-roles/component.js index 3c4f9a598c..3b8c0c9da7 100644 --- a/app/components/form-scoped-roles/component.js +++ b/app/components/form-scoped-roles/component.js @@ -7,6 +7,7 @@ import layout from './template'; import NewOrEdit from 'ui/mixins/new-or-edit'; import { next } from '@ember/runloop'; import $ from 'jquery'; +import { capitalize } from '@ember/string'; const CUSTOM = 'custom'; @@ -37,7 +38,7 @@ export default Component.extend(NewOrEdit, { primaryResource: this.make(model), stdUser: `${ get(this, 'type') }-member`, admin: `${ get(this, 'type') }-owner`, - cTyped: get(this, 'type').capitalize(), + cTyped: capitalize(get(this, 'type')), }); }, diff --git a/app/components/modal-rollback-app/component.js b/app/components/modal-rollback-app/component.js index 876093fbd6..1dfde5014a 100644 --- a/app/components/modal-rollback-app/component.js +++ b/app/components/modal-rollback-app/component.js @@ -4,6 +4,7 @@ import ModalBase from 'shared/mixins/modal-base'; import layout from './template'; import jsondiffpatch from 'jsondiffpatch'; import moment from 'moment'; +import { htmlSafe } from '@ember/string'; const HIDDEN_FIELDS = ['digest']; @@ -95,7 +96,7 @@ export default Component.extend(ModalBase, { jsondiffpatch.formatters.html.hideUnchanged(); - return jsondiffpatch.formatters.html.format(delta, left).htmlSafe(); + return htmlSafe(jsondiffpatch.formatters.html.format(delta, left)); } return null; diff --git a/app/components/modal-rollback-mc-app/component.js b/app/components/modal-rollback-mc-app/component.js index 7a5cdce0dd..99c20745aa 100644 --- a/app/components/modal-rollback-mc-app/component.js +++ b/app/components/modal-rollback-mc-app/component.js @@ -5,6 +5,7 @@ import layout from './template'; import jsondiffpatch from 'jsondiffpatch'; import moment from 'moment'; import { notEmpty } from '@ember/object/computed'; +import { htmlSafe } from '@ember/string'; const HIDDEN_FIELDS = ['digest', 'created', 'createdTS', 'links', 'uuid', 'id', 'name']; @@ -95,7 +96,7 @@ export default Component.extend(ModalBase, { jsondiffpatch.formatters.html.hideUnchanged(); - return jsondiffpatch.formatters.html.format(delta, left).htmlSafe(); + return htmlSafe(jsondiffpatch.formatters.html.format(delta, left)); }, getMultiClusterAppRevisions() { diff --git a/app/components/modal-rollback-service/component.js b/app/components/modal-rollback-service/component.js index 08ab20cd90..f4c9aae63b 100644 --- a/app/components/modal-rollback-service/component.js +++ b/app/components/modal-rollback-service/component.js @@ -5,6 +5,7 @@ import ModalBase from 'shared/mixins/modal-base'; import layout from './template'; import C from 'shared/utils/constants'; import moment from 'moment'; +import { htmlSafe } from '@ember/string'; import jsondiffpatch from 'jsondiffpatch'; @@ -120,7 +121,7 @@ export default Component.extend(ModalBase, { jsondiffpatch.formatters.html.hideUnchanged(); - return jsondiffpatch.formatters.html.format(delta, left).htmlSafe(); + return htmlSafe(jsondiffpatch.formatters.html.format(delta, left)); } return null; diff --git a/app/components/modal-view-template-diff/component.js b/app/components/modal-view-template-diff/component.js index cd43075fd3..54da8315ee 100644 --- a/app/components/modal-view-template-diff/component.js +++ b/app/components/modal-view-template-diff/component.js @@ -3,6 +3,7 @@ import { get, set } from '@ember/object'; import { inject as service } from '@ember/service'; import jsondiffpatch from 'jsondiffpatch'; import ModalBase from 'shared/mixins/modal-base'; +import { htmlSafe } from '@ember/string'; import layout from './template'; @@ -36,7 +37,7 @@ export default Component.extend(ModalBase, { jsondiffpatch.formatters.html.hideUnchanged(); - const diff = jsondiffpatch.formatters.html.format(delta, templates[0]).htmlSafe(); + const diff = htmlSafe(jsondiffpatch.formatters.html.format(delta, templates[0])); set(this, 'diff', diff); } else { diff --git a/app/components/page-header-project/component.js b/app/components/page-header-project/component.js index b206eea5f1..92bfceb504 100644 --- a/app/components/page-header-project/component.js +++ b/app/components/page-header-project/component.js @@ -9,6 +9,7 @@ import { next } from '@ember/runloop'; import { escapeRegex, escapeHtml } from 'shared/utils/util'; import $ from 'jquery'; import { isEmpty } from '@ember/utils'; +import { htmlSafe } from '@ember/string'; const ITEM_HEIGHT = 50; const BUFFER_HEIGHT = 150; @@ -563,7 +564,7 @@ export default Component.extend(ThrottledResize, { const rows = Math.max(3, Math.min(want, roomFor)); const height = rows * ITEM_HEIGHT; - set(this, 'columnStyle', `height: ${ height }px`.htmlSafe()); + set(this, 'columnStyle', htmlSafe(`height: ${ height }px`)); let cw = Math.max(MIN_COLUMN_WIDTH, get(this, 'clustersWidth') + 60); // 20px icon, 20px padding, 20px scrollbar let pw = Math.max(MIN_COLUMN_WIDTH, get(this, 'projectsWidth') + 60); @@ -576,7 +577,7 @@ export default Component.extend(ThrottledResize, { pw = roomFor - cw; } - set(this, 'menuStyle', `grid-template-columns: ${ cw }px ${ pw }px`.htmlSafe()); + set(this, 'menuStyle', htmlSafe(`grid-template-columns: ${ cw }px ${ pw }px`)); }, isTransitioning() { @@ -634,7 +635,7 @@ function highlightMatches(needle, haystack) { // 5. Return as a safe string return { found, - match: haystack.htmlSafe() + match: htmlSafe(haystack) } } diff --git a/app/components/progress-bar-multi/component.js b/app/components/progress-bar-multi/component.js index 4afc88d33f..37780297d1 100644 --- a/app/components/progress-bar-multi/component.js +++ b/app/components/progress-bar-multi/component.js @@ -1,4 +1,5 @@ import { defineProperty, computed, get, observer } from '@ember/object'; +import { htmlSafe } from '@ember/string'; import Component from '@ember/component'; import layout from './template'; import $ from 'jquery'; @@ -74,7 +75,7 @@ export default Component.extend({ } out.forEach((obj) => { - obj.css = (`width: ${ obj.percent }%`).htmlSafe(); + obj.css = htmlSafe((`width: ${ obj.percent }%`)); }); return out.filter((obj) => obj.percent); diff --git a/app/models/cluster.js b/app/models/cluster.js index b9761d2d3e..27fb0f8cf4 100644 --- a/app/models/cluster.js +++ b/app/models/cluster.js @@ -13,6 +13,7 @@ import moment from 'moment'; import jsondiffpatch from 'jsondiffpatch'; import { isArray } from '@ember/array'; import Semver from 'semver'; +import { capitalize } from '@ember/string'; const TRUE = 'True'; const CLUSTER_TEMPLATE_ID_PREFIX = 'cattle-global-data:'; @@ -595,7 +596,7 @@ export default Resource.extend(Grafana, ResourceUsage, { case 'rancherd': return intl.t('clusterNew.rancherd.shortLabel'); default: - return driverName.capitalize(); + return capitalize(driverName); } } else { return intl.t('clusterNew.import.shortLabel'); diff --git a/app/models/kontainerdriver.js b/app/models/kontainerdriver.js index db5a3a402b..752b570807 100644 --- a/app/models/kontainerdriver.js +++ b/app/models/kontainerdriver.js @@ -1,6 +1,7 @@ import Resource from '@rancher/ember-api-store/models/resource'; import { computed, get } from '@ember/object'; import { inject as service } from '@ember/service'; +import { capitalize } from '@ember/string'; var KontainerDriver = Resource.extend({ intl: service(), @@ -40,7 +41,7 @@ var KontainerDriver = Resource.extend({ } if ( intl.exists(keyById) ) { return intl.t(keyById); } else if ( name ) { - return name.capitalize(); + return capitalize(name); } else { return `(${ get(this, 'id') })`; } diff --git a/app/models/mountentry.js b/app/models/mountentry.js index 91a69038da..2d21d3753b 100644 --- a/app/models/mountentry.js +++ b/app/models/mountentry.js @@ -3,6 +3,7 @@ import { equal } from '@ember/object/computed'; import { inject as service } from '@ember/service'; import Resource from '@rancher/ember-api-store/models/resource'; import { reference } from '@rancher/ember-api-store/utils/denormalize'; +import { htmlSafe } from '@ember/string'; export default Resource.extend({ intl: service(), @@ -16,7 +17,7 @@ export default Resource.extend({ let name = this.get('volumeName'); if ( name.match(/^[0-9a-f]{64}$/) ) { - return (`${ name.substr(0, 12) }…`).htmlSafe(); + return htmlSafe(`${ name.substr(0, 12) }…`); } return name; diff --git a/app/models/nodedriver.js b/app/models/nodedriver.js index 6d55520e64..fe98b4bb76 100644 --- a/app/models/nodedriver.js +++ b/app/models/nodedriver.js @@ -1,5 +1,6 @@ import { get, computed } from '@ember/object'; import { inject as service } from '@ember/service'; +import { capitalize } from '@ember/string'; import Resource from '@rancher/ember-api-store/models/resource'; import C from 'ui/utils/constants'; import { parseExternalId } from 'ui/utils/parse-externalid'; @@ -53,7 +54,7 @@ export default Resource.extend({ if ( name && intl.exists(key) ) { return intl.t(key); } else if ( name ) { - return name.capitalize(); + return capitalize(name); } else { return `(${ get(this, 'id') })`; } diff --git a/app/models/nodetemplate.js b/app/models/nodetemplate.js index b0f9dfe2fb..24661f39e1 100644 --- a/app/models/nodetemplate.js +++ b/app/models/nodetemplate.js @@ -125,7 +125,7 @@ export default Resource.extend({ this.registerDynamicComputedProperty('displaySize', computedKeys, size.getDisplayProperty); } else { - set(this, 'displaySize', get(this, 'config.size') || 'N/A'); + // set(this, 'displaySize', get(this, 'config.size') || 'N/A'); } }, diff --git a/app/models/template.js b/app/models/template.js index 5c768b4be8..97ab8f7aa3 100644 --- a/app/models/template.js +++ b/app/models/template.js @@ -1,4 +1,4 @@ -import { htmlSafe } from '@ember/string'; +import { htmlSafe, underscore } from '@ember/string'; import { computed, get } from '@ember/object'; import { inject as service } from '@ember/service'; import Resource from '@rancher/ember-api-store/models/resource'; @@ -93,7 +93,7 @@ const Template = Resource.extend({ }), categoryLowerArray: computed('categoryArray.[]', function() { - return get(this, 'categoryArray').map((x) => (x || '').underscore().toLowerCase()); + return get(this, 'categoryArray').map((x) => underscore(x || '').toLowerCase()); }), certifiedType: computed('catalogId', 'labels', function() { diff --git a/lib/global-admin/addon/components/new-edit-role/component.js b/lib/global-admin/addon/components/new-edit-role/component.js index 41f66c3200..2ec9eaa535 100644 --- a/lib/global-admin/addon/components/new-edit-role/component.js +++ b/lib/global-admin/addon/components/new-edit-role/component.js @@ -1,5 +1,6 @@ import { alias, or } from '@ember/object/computed'; import { inject as service } from '@ember/service'; +import { capitalize } from '@ember/string'; import Component from '@ember/component'; import C from 'ui/utils/constants'; import layout from './template'; @@ -92,7 +93,7 @@ export default Component.extend(ViewNewEdit, { }, readableRole: computed('roleType', function() { - return (get(this, 'roleType') || '').capitalize(); + return capitalize(get(this, 'roleType') || ''); }), isDefault: computed('model.role', 'roleType', { diff --git a/lib/global-admin/addon/mixins/saml-auth.js b/lib/global-admin/addon/mixins/saml-auth.js index 7305eb9277..863bc97a64 100644 --- a/lib/global-admin/addon/mixins/saml-auth.js +++ b/lib/global-admin/addon/mixins/saml-auth.js @@ -6,6 +6,7 @@ import { import { alias } from '@ember/object/computed'; import C from 'ui/utils/constants'; import { isEmpty } from '@ember/utils'; +import { capitalize } from '@ember/string'; export default Mixin.create({ intl: service(), @@ -142,7 +143,7 @@ export default Mixin.create({ }), numUsers: computed('authConfig.allowedIdentities.@each.externalIdType', 'providerName', 'wasRestricted', function() { - let type = `PROJECT.TYPE_${ get(this, 'providerName').capitalize() }_USER`; + let type = `PROJECT.TYPE_${ capitalize(get(this, 'providerName')) }_USER`; type = get(C, type); @@ -150,7 +151,7 @@ export default Mixin.create({ }), numOrgs: computed('authConfig.allowedIdentities.@each.externalIdType', 'providerName', 'wasRestricted', function() { - let type = `PROJECT.TYPE_${ get(this, 'providerName').capitalize() }_GROUP`; + let type = `PROJECT.TYPE_${ capitalize(get(this, 'providerName')) }_GROUP`; type = get(C, type); diff --git a/lib/global-admin/addon/security/roles/index/controller.js b/lib/global-admin/addon/security/roles/index/controller.js index e66c9e0e14..8fe03e5fed 100644 --- a/lib/global-admin/addon/security/roles/index/controller.js +++ b/lib/global-admin/addon/security/roles/index/controller.js @@ -1,6 +1,7 @@ import Controller from '@ember/controller'; import { computed, get, set } from '@ember/object'; import { next } from '@ember/runloop'; +import { capitalize } from '@ember/string'; import C from 'ui/utils/constants'; import { equal } from '@ember/object/computed'; import { inject as service } from '@ember/service'; @@ -71,7 +72,7 @@ export default Controller.extend({ }), readableMode: computed('context', function() { - return (get(this, 'context') || '').capitalize(); + return capitalize(get(this, 'context') || ''); }), globalRows: computed('model.globalRoles.@each.{name,state}', function() { diff --git a/lib/pipeline/addon/components/pipeline-codemirror/component.js b/lib/pipeline/addon/components/pipeline-codemirror/component.js deleted file mode 100644 index 7209c487f8..0000000000 --- a/lib/pipeline/addon/components/pipeline-codemirror/component.js +++ /dev/null @@ -1,125 +0,0 @@ -import CodeMirror from 'codemirror'; -import layout from './template' -import { get } from '@ember/object'; -import { observer } from '@ember/object'; -import Component from '@ember/component'; -import { bind, once, scheduleOnce } from '@ember/runloop'; -import { inject as service } from '@ember/service'; - -export default Component.extend({ - codeMirror: service(), - - layout, - tagName: 'textarea', - - didInsertElement() { - this._super(...arguments); - CodeMirror.registerHelper('hint', 'anyword', (editor /* ,options*/) => { - var cur = editor.getCursor(); - var end = cur.ch, start = end; - var matched = get(this, 'codeMirror').getMatchedHint(editor.getValue(), editor); - - return { - list: matched.matchedArry, - from: CodeMirror.Pos(cur.line, start - matched.index), - to: CodeMirror.Pos(cur.line, end) - }; - }); - this._codeMirror = get(this, 'codeMirror').fromTextArea(get(this, 'elementId'), get(this, 'element')); - var arrows = [37, 38, 39, 40, 13] - - this._codeMirror.on('keyup', (cm, e) => { - if (arrows.indexOf(e.keyCode) < 0) { - this._codeMirror.showHint({ completeSingle: false }) - } - }) - // Send a "valueUpdated" action when CodeMirror triggers a "change" event. - this.setupCodeMirrorEventHandler('change', this, this.scheduleValueUpdatedAction); - }, - - didRender() { - this._super(...arguments); - - this.updateCodeMirrorOptions(); - this.updateCodeMirrorValue(); - }, - - willDestroyElement() { - this._super(...arguments); - - // Remove the editor and restore the original textarea. - this._codeMirror.toTextArea(); - - get(this, 'codeMirror').unregisterInstance(get(this, 'elementId')); - - delete this._codeMirror; - }, - isVisibleDidChange: observer('isVisible', function() { - if (this._wasVisible === get(this, 'isVisible')) { - return; - } - - scheduleOnce('render', this, this.toggleVisibility); - }), - - scheduleValueUpdatedAction(codeMirror, changeObj) { - once(this, this.sendValueUpdatedAction, codeMirror.getValue(), codeMirror, changeObj); - }, - - setupCodeMirrorEventHandler(event, target, method) { - const callback = bind(target, method); - - this._codeMirror.on(event, callback); - - this.one('willDestroyElement', this, function() { - this._codeMirror.off(event, callback); - }); - }, - - sendValueUpdatedAction(...args) { - if (this.valueUpdated) { - this.valueUpdated(...args); - } - }, - - toggleVisibility() { - const isVisible = get(this, 'isVisible'); - - if (this._wasVisible === isVisible) { - return; - } - - this._wasVisible = isVisible; - - if (isVisible) { - // Force a refresh when becoming visible, since CodeMirror won't render - // itself onto a hidden element. - this._codeMirror.refresh(); - } - }, - - updateCodeMirrorOption(option, value) { - if (this._codeMirror.getOption(option) !== value) { - this._codeMirror.setOption(option, value); - } - }, - - updateCodeMirrorOptions() { - const options = get(this, 'options'); - - if (options) { - Object.keys(options).forEach(function(option) { - this.updateCodeMirrorOption(option, options[option]); - }, this); - } - }, - - updateCodeMirrorValue() { - const value = get(this, 'value'); - - if (value !== this._codeMirror.getValue()) { - this._codeMirror.setValue(value || ''); - } - }, - -}); diff --git a/lib/pipeline/addon/components/pipeline-codemirror/template.hbs b/lib/pipeline/addon/components/pipeline-codemirror/template.hbs deleted file mode 100644 index 889d9eeadc..0000000000 --- a/lib/pipeline/addon/components/pipeline-codemirror/template.hbs +++ /dev/null @@ -1 +0,0 @@ -{{yield}} diff --git a/lib/shared/addon/components/catalog-index/component.js b/lib/shared/addon/components/catalog-index/component.js index da2480c6d8..04d54a4712 100644 --- a/lib/shared/addon/components/catalog-index/component.js +++ b/lib/shared/addon/components/catalog-index/component.js @@ -5,6 +5,7 @@ import layout from './template'; import { inject as service } from '@ember/service'; import { observer, computed, get, set } from '@ember/object'; import { isEmpty } from '@ember/utils'; +import { underscore } from '@ember/string'; export default Component.extend({ catalog: service(), @@ -96,7 +97,7 @@ export default Component.extend({ for ( let i = 0 ; i < categories.length ; i++ ) { let ctgy = categories[i]; - let normalized = ctgy.underscore(); + let normalized = underscore(ctgy); if (map[normalized] ) { map[normalized].count += 1; diff --git a/lib/shared/addon/components/cluster-driver/driver-rke/component.js b/lib/shared/addon/components/cluster-driver/driver-rke/component.js index 8bf034558c..4d6d578328 100644 --- a/lib/shared/addon/components/cluster-driver/driver-rke/component.js +++ b/lib/shared/addon/components/cluster-driver/driver-rke/component.js @@ -5,6 +5,7 @@ import { alias, equal, or } from '@ember/object/computed'; import { on } from '@ember/object/evented'; import { next, once, scheduleOnce } from '@ember/runloop'; import { inject as service } from '@ember/service'; +import { dasherize } from '@ember/string'; import { isEmpty, typeOf } from '@ember/utils'; import { validateHostname } from '@rancher/ember-api-store/utils/validate'; import deepSet from 'ember-deep-set'; @@ -31,9 +32,9 @@ function camelToUnderline(str, split = true) { if ( str.indexOf('-') > -1 || str.endsWith('CloudProvider')) { return str; } else if ( split ) { - return (str || '').dasherize().split('-').join('_'); + return dasherize(str || '').split('-').join('_'); } else { - return (str || '').dasherize(); + return dasherize(str || ''); } } diff --git a/lib/shared/addon/components/graph-area/component.js b/lib/shared/addon/components/graph-area/component.js index 36d3b3a396..89a99504bc 100644 --- a/lib/shared/addon/components/graph-area/component.js +++ b/lib/shared/addon/components/graph-area/component.js @@ -1,4 +1,5 @@ import { inject as service } from '@ember/service'; +import { htmlSafe } from '@ember/string'; import { get, set, observer } from '@ember/object'; import ThrottledResize from 'shared/mixins/throttled-resize'; import { escapeHtml } from 'shared/utils/util'; @@ -223,7 +224,7 @@ export default Component.extend(ThrottledResize, { html += ''; - return html.htmlSafe(); + return htmlSafe(html); } }, grid: { diff --git a/lib/shared/addon/components/modal-add-custom-roles/component.js b/lib/shared/addon/components/modal-add-custom-roles/component.js index 1abe26e0ae..cfd22fbb16 100644 --- a/lib/shared/addon/components/modal-add-custom-roles/component.js +++ b/lib/shared/addon/components/modal-add-custom-roles/component.js @@ -3,6 +3,7 @@ import ModalBase from 'shared/mixins/modal-base'; import layout from './template'; import { get, set, setProperties, computed } from '@ember/object'; import { alias } from '@ember/object/computed'; +import { capitalize } from '@ember/string'; export default Component.extend(ModalBase, { layout, @@ -19,7 +20,7 @@ export default Component.extend(ModalBase, { setProperties(this, { mode: 'custom', - cTyped: get(this, 'type').capitalize() + cTyped: capitalize(get(this, 'type')) }); }, diff --git a/lib/shared/addon/components/resource-event-list/component.js b/lib/shared/addon/components/resource-event-list/component.js index a243e2e2c2..21d2686aa2 100644 --- a/lib/shared/addon/components/resource-event-list/component.js +++ b/lib/shared/addon/components/resource-event-list/component.js @@ -1,5 +1,6 @@ import Component from '@ember/component'; import { inject as service } from '@ember/service'; +import { capitalize } from '@ember/string'; import layout from './template'; import { computed, set, get, observer } from '@ember/object'; @@ -91,7 +92,7 @@ export default Component.extend({ if ( get(this, 'clusterEvents') ) { url += 'events' } else { - const query = `fieldSelector=involvedObject.name=${ get(this, 'name') },involvedObject.kind=${ get(this, 'kind').capitalize() }`; + const query = `fieldSelector=involvedObject.name=${ get(this, 'name') },involvedObject.kind=${ capitalize(get(this, 'kind')) }`; if ( NON_NAMESPACED_RESOURCES.indexOf(get(this, 'kind')) === -1 ) { url += `namespaces/${ get(this, 'namespaceId') }/`; diff --git a/lib/shared/addon/components/sortable-table/component.js b/lib/shared/addon/components/sortable-table/component.js index e908b5b268..5669051a67 100644 --- a/lib/shared/addon/components/sortable-table/component.js +++ b/lib/shared/addon/components/sortable-table/component.js @@ -65,7 +65,7 @@ export default Component.extend(Sortable, StickyHeader, { selectedNodes: null, prevNode: null, searchText: null, - isVisible: true, + shouldShow: true, page: 1, pagingLabel: 'pagination.generic', @@ -144,7 +144,7 @@ export default Component.extend(Sortable, StickyHeader, { }, didReceiveAttrs() { - if (get(this, 'isVisible')) { + if (get(this, 'shouldShow')) { this.triggerResize(); } }, diff --git a/lib/shared/addon/components/sortable-table/template.hbs b/lib/shared/addon/components/sortable-table/template.hbs index 796959f19f..9f9ed5ca4a 100644 --- a/lib/shared/addon/components/sortable-table/template.hbs +++ b/lib/shared/addon/components/sortable-table/template.hbs @@ -1,3 +1,4 @@ +{{#if this.shouldShow}} {{#if showHeader}}