1
0
Fork 0
mirror of synced 2024-10-01 09:38:55 +13:00

Prevent collapsed component settings sections reverting on component settings changes. (#12523)

* wip

* lint

* fixes

* Pr feedback

* remove unneeded renaming

* remove other unneeded renaming
This commit is contained in:
Gerard Burns 2023-12-08 12:22:40 +00:00 committed by GitHub
parent 930b8c934f
commit af35250371
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 7 deletions

View file

@ -1,20 +1,17 @@
<script>
import Icon from "../Icon/Icon.svelte"
import { createEventDispatcher } from "svelte"
export let name
export let show = false
export let initiallyShow = false
export let collapsible = true
const dispatch = createEventDispatcher()
let show = initiallyShow
const onHeaderClick = () => {
if (!collapsible) {
return
}
show = !show
if (show) {
dispatch("open")
}
}
</script>

View file

@ -32,6 +32,7 @@
const generalSettings = settings.filter(
setting => !setting.section && setting.tag === tag
)
const customSections = settings.filter(
setting => setting.section && setting.tag === tag
)
@ -151,7 +152,7 @@
{#if section.visible}
<DetailSummary
name={showSectionTitle ? section.name : ""}
show={section.collapsed !== true}
initiallyShow={section.collapsed !== true}
>
{#if section.info}
<div class="section-info">