@davout
@davout
Forum Replies Created
-
AuthorPosts
-
February 9, 2021 at 8:56 am in reply to: smart-date-time-picker and Angular reactive form setvalue #101461
davout
Memberdavout
Memberdavout
Memberdavout
MemberI’ve found that I can use the following code to check what component originated the ‘onClose’ call
onClose($event, fromWindow: boolean): void {
if (($event.srcElement as Element).id === ‘smartWindow’) {
this.taskEditService.hide();
}
}
Is that the best approach?
Also, how do I block closing inside the ‘onClosing’ event handler?davout
MemberHi,
Tracing this further I have found that if a ‘smart-window’ includes a ‘smart-drop-down-list’ inside a form, then when I change/select a new drop down item then this is generating ‘smart-window’ level ‘onClosing’ and ‘onClose’ event calls. Is this a bug?
(I would attach a screenshot, but I can’t find a way of copy/pasting images into this forum message)
It’s no clear from your docs how I would stop a window closing via a ‘onClosing’ event handler. The code below shows my current handler.onClosing(event: CustomEvent): void { console.log('onclosing ', event); } How would I be able to detect 'onClosing' calls that were generated by the drop-down-list versus the smart window itself?
davout
Memberdavout
MemberThe “opened” property is linked to a component property called “visible”. The smart window is being displayed, but there is no footer element displayed within the window. I have included the ‘smart-window’ element as content within an app component. The latest code is shown below, and this still does not display the footer area as expected
<smart-window label="{{formTitle}}" [opened]="visible" [windowParent]="'body'" [resizeIndicator]="true" [resizeMode]="'both'" [headerButtons]="['close','minimize','pin','collapse']" [footerTemplate]="'footerTemplate'" [footerPosition]="'bottom'" (onClose)="taskEditService.hide()" > <div> <smart-input [placeholder]="'task name'"></smart-input> </div> <div> <smart-button class="flat">Today</smart-button> <smart-button class="flat">Tomorrow</smart-button> <smart-button class="flat">This week</smart-button> </div> <div> <smart-button class="flat">Next week</smart-button> <smart-button class="flat">This month</smart-button> <smart-button class="flat">Next month</smart-button> </div> </smart-window> <template id="footerTemplate"> <smart-button class="flat">Save</smart-button> <smart-button class="flat">Restore</smart-button> </template> Is there a way to post screen shots via this forum?
davout
Memberdavout
Memberdavout
MemberSeptember 15, 2020 at 7:04 am in reply to: anchor the grid column panel form on another location? #101063davout
MemberSeptember 14, 2020 at 10:21 am in reply to: Columns "cellsFormat' property – docs to explain options? #101055davout
Memberdavout
MemberThe problem with ‘Smart card view’ is that it requires me to write component code to build UI layout, which is useful if the view component is dynamic, but really a pain when for my case the number of cards is static.
My suggestion would be to make the addition of cards simpler and keep the layout distinct from the component data.davout
MemberAugust 17, 2020 at 11:47 am in reply to: How to set character width of text input control and mask inputs? #100974 -
AuthorPosts