discourse/app/assets/javascripts/admin/addon/components/site-settings/enum.gjs
Jarek Radosz ce6368ca98
DEV: Enable ember/no-classic-components (#33978)
…and apply lint-to-the-future
2025-07-30 14:54:24 +02:00

19 lines
612 B
Text

/* eslint-disable ember/no-classic-components */
import Component from "@ember/component";
import { fn, hash } from "@ember/helper";
import ComboBox from "select-kit/components/combo-box";
export default class Enum extends Component {
<template>
<ComboBox
@content={{this.setting.validValues}}
@value={{this.value}}
@onChange={{fn (mut this.value)}}
@valueProperty={{this.setting.computedValueProperty}}
@nameProperty={{this.setting.computedNameProperty}}
@options={{hash castInteger=true allowAny=this.setting.allowsNone}}
/>
{{this.preview}}
</template>
}