Skip to content

Commit

Permalink
Merge pull request #135 from pie-framework/fix/PD-3075
Browse files Browse the repository at this point in the history
fix: add type button instead of default type submit PD-3075
  • Loading branch information
andreeapescar authored Jul 28, 2023
2 parents 9bf92a0 + 1f50613 commit 6f882e0
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions src/components/pie-preview-layout/pie-preview-layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import { ModelUpdatedEvent } from '@pie-framework/pie-configure-events';

// TODO sticky mdc focus workaround https://github.com/prateekbh/preact-material-components/issues/625

@Component({
tag: 'pie-preview-layout',
@Component({
tag: 'pie-preview-layout',
styleUrls: [
"pie-preview-layout.scss"
]})
Expand All @@ -23,7 +23,7 @@ export class PiePreviewLayout {
activeIndex: number = 0;

@Prop() config: Object;


@Watch('activeIndex')
watchActiveIndex(newVal) {
Expand Down Expand Up @@ -52,7 +52,7 @@ export class PiePreviewLayout {
async handleModelUpdated(ev) {
const {reset, update} = ev.detail;
reset === true;// TODO - not sure what reset true does

await this.piePlayerElement.updateElementModel(update);

}
Expand All @@ -70,6 +70,7 @@ export class PiePreviewLayout {
role="tab"
aria-selected="true"
tabindex="0"
type="button"
>
<span class="mdc-tab__content">
<span class="mdc-tab__text-label">Build</span>
Expand All @@ -85,6 +86,7 @@ export class PiePreviewLayout {
role="tab"
aria-selected="true"
tabindex="1"
type="button"
>
<span class="mdc-tab__content">
<span class="mdc-tab__text-label">Item Preview</span>
Expand All @@ -103,22 +105,22 @@ export class PiePreviewLayout {
{/* tab content */}
<div class="author-preview-tab-contents">

<div
<div
ref={(el) => this.designElement = el as HTMLDivElement}
>
<slot
<slot
name='configure' />
</div>

<div
<div
style={{display: 'none'}}
ref={(el) => this.previewElement = el as HTMLDivElement}
>
<div class="preview-control">
<pie-preview-control onEnvChanged={(ev) => {
this.piePlayerElement.env = {mode: ev.detail.mode, role: ev.detail.role};
}}
></pie-preview-control>
></pie-preview-control>
</div>
<div class="pie-player">
<pie-player
Expand All @@ -127,7 +129,7 @@ export class PiePreviewLayout {
config={this.config as ItemConfig}></pie-player>
</div>
</div>


</div>
</div>
Expand Down

0 comments on commit 6f882e0

Please sign in to comment.