Ensure side panel ejection works properly and tidy up table block structure

This commit is contained in:
Andrew Kingston 2022-11-17 14:18:55 +00:00
parent 64828e3b06
commit 4e519d75b4
3 changed files with 45 additions and 43 deletions

View File

@ -3667,7 +3667,7 @@
"Ascending", "Ascending",
"Descending" "Descending"
], ],
"defaultValue": "Descending" "defaultValue": "Ascending"
}, },
{ {
"type": "number", "type": "number",
@ -4578,7 +4578,7 @@
"type": "boolean", "type": "boolean",
"key": "showTitleButton", "key": "showTitleButton",
"label": "Show button above table", "label": "Show button above table",
"defaultValue": true "defaultValue": false
}, },
{ {
"type": "text", "type": "text",

View File

@ -39,9 +39,7 @@
hidden hidden
class="side-panel" class="side-panel"
> >
{#if open}
<slot /> <slot />
{/if}
</div> </div>
<style> <style>

View File

@ -184,7 +184,7 @@
props={{ props={{
dataSource, dataSource,
filter: enrichedFilter, filter: enrichedFilter,
sortColumn: sortColumn || normalFields?.[0], sortColumn,
sortOrder, sortOrder,
paginate, paginate,
limit: rowCount, limit: rowCount,
@ -206,6 +206,7 @@
}} }}
/> />
</BlockComponent> </BlockComponent>
{#if clickBehaviour === "details"}
<BlockComponent <BlockComponent
type="sidepanel" type="sidepanel"
bind:id={detailsSidePanelId} bind:id={detailsSidePanelId}
@ -226,6 +227,8 @@
}} }}
/> />
</BlockComponent> </BlockComponent>
{/if}
{#if showTitleButton && titleButtonClickBehaviour === "new"}
<BlockComponent <BlockComponent
type="sidepanel" type="sidepanel"
bind:id={newRowSidePanelId} bind:id={newRowSidePanelId}
@ -245,6 +248,7 @@
}} }}
/> />
</BlockComponent> </BlockComponent>
{/if}
</BlockComponent> </BlockComponent>
</Block> </Block>
{/if} {/if}