What does this PR do? ===================== This PR refactors param-input to use FormKit. FormKit is a structured form tool in the core. After the rewrite, we will be able to get semantic parameter error prompts, etc. meta link: https://meta.discourse.org/t/wishlist-param-dropdown-for-data-explorer-query/253883/28?u=lhc_fl
24 lines
573 B
Plaintext
24 lines
573 B
Plaintext
import Component from "@glimmer/component";
|
|
import { inject as service } from "@ember/service";
|
|
import GroupChooser from "select-kit/components/group-chooser";
|
|
|
|
export default class GroupListInput extends Component {
|
|
@service site;
|
|
|
|
get allGroups() {
|
|
return this.site.get("groups");
|
|
}
|
|
|
|
<template>
|
|
<@field.Custom id={{@field.id}}>
|
|
<GroupChooser
|
|
@content={{this.allGroups}}
|
|
@value={{@field.value}}
|
|
@labelProperty="name"
|
|
@valueProperty="name"
|
|
@onChange={{@field.set}}
|
|
/>
|
|
</@field.Custom>
|
|
</template>
|
|
}
|