Allow open by default for field groups
This commit is contained in:
parent
352ea72c53
commit
758b4f8254
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
export let value
|
export let value
|
||||||
export let name
|
export let name
|
||||||
|
export let config
|
||||||
|
|
||||||
let dispatch = createEventDispatcher()
|
let dispatch = createEventDispatcher()
|
||||||
|
|
||||||
|
@ -20,7 +21,8 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Accordion
|
<Accordion
|
||||||
initialOpen={Object.values(value).some(properties => !!properties.value)}
|
initialOpen={config?.openByDefault ||
|
||||||
|
Object.values(value).some(properties => !!properties.value)}
|
||||||
header={name}
|
header={name}
|
||||||
>
|
>
|
||||||
<Layout gap="S">
|
<Layout gap="S">
|
||||||
|
|
|
@ -85,6 +85,7 @@ const SCHEMA: Integration = {
|
||||||
default: true,
|
default: true,
|
||||||
display: "Configure Active Directory",
|
display: "Configure Active Directory",
|
||||||
hidden: "'{{authType}}' !== 'Active Directory'",
|
hidden: "'{{authType}}' !== 'Active Directory'",
|
||||||
|
config: { openByDefault: true },
|
||||||
fields: {
|
fields: {
|
||||||
clientId: {
|
clientId: {
|
||||||
type: DatasourceFieldType.STRING,
|
type: DatasourceFieldType.STRING,
|
||||||
|
|
|
@ -118,9 +118,15 @@ interface DatasourceSelectFieldConfig extends DatasourceBasicFieldConfig {
|
||||||
config: { options: string[] }
|
config: { options: string[] }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface DatasourceFieldGroupConfig extends DatasourceBasicFieldConfig {
|
||||||
|
type: DatasourceFieldType.FIELD_GROUP
|
||||||
|
config: { openByDefault?: boolean }
|
||||||
|
}
|
||||||
|
|
||||||
type DatasourceFieldConfig =
|
type DatasourceFieldConfig =
|
||||||
| DatasourceBasicFieldConfig
|
|
||||||
| DatasourceSelectFieldConfig
|
| DatasourceSelectFieldConfig
|
||||||
|
| DatasourceFieldGroupConfig
|
||||||
|
| DatasourceBasicFieldConfig
|
||||||
|
|
||||||
export interface DatasourceConfig {
|
export interface DatasourceConfig {
|
||||||
[key: string]: DatasourceFieldConfig & {
|
[key: string]: DatasourceFieldConfig & {
|
||||||
|
|
Loading…
Reference in New Issue