Ghost/ghost/admin/app/components/tiers/segment-select.hbs
Kevin Ansfield 63b1e4e8ad
Resolved power-select related deprecation warnings for loading components by string (#15466)
no issue

- in many places we were passing a string as an argument to a `<PowerSelect>` related component that referred to a component name, that was throwing deprecation warnings because those strings were used dynamically with `{{component}}` later on which isn't statically analyzable
- switched to passing a component explicitly with `{{component}}`
- https://github.com/embroider-build/embroider/blob/main/REPLACING-COMPONENT-HELPER.md#when-youre-passing-a-component-to-someone-else
2022-09-24 17:00:05 +02:00

23 lines
701 B
Handlebars

<GhTokenInput
@options={{this.options}}
@selected={{this.selectedOptions}}
@disabled={{or @disabled this.fetchOptionsTask.isRunning}}
@optionsComponent={{component "power-select/options"}}
@allowCreation={{false}}
@renderInPlace={{this.renderInPlace}}
@onChange={{this.setSegment}}
@class="select-members gh-tier-token-input"
@placeholder="Select a tier"
as |option|
>
<span data-test-tiers-segment={{option.name}}>{{option.name}}</span>
</GhTokenInput>
{{#if @showMemberCount}}
<GhMembersSegmentCount
@segment={{@segment}}
@enforcedFilter={{@enforcedCountFilter}}
@onSegmentCountChange={{@onSegmentCountChange}}
/>
{{/if}}