Ghost/ghost/admin/app/components/offers/segment-select.hbs

23 lines
703 B
Handlebars
Raw Normal View History

<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-offer-token-input"
@placeholder="Select an offer"
as |option|
>
<span data-test-offers-segment={{option.id}}>{{option.name}}</span>
</GhTokenInput>
{{#if @showMemberCount}}
<GhMembersSegmentCount
@segment={{@segment}}
@enforcedFilter={{@enforcedCountFilter}}
@onSegmentCountChange={{@onSegmentCountChange}}
/>
{{/if}}