@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 #101461davoutMember
Do I pass ‘null’ as the value if I want to have the datepicker start with no date displayed?
By default, it seems that the data picker is showing today’s datedavoutMemberThink I solved it, with…
smart-button button:hover { background-color: var(--smart-primary) !important; border: 1px white solid; color: white !important; } smart-button button:disabled { background-color: var(--smart-primary) !important; color: aliceblue !important; }
davoutMemberBrilliant! That solves it.
I would suggest reviewing your component docs, because the solution you have outlined is not at all obvious from what currently existsdavoutMemberI’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?davoutMemberHi,
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?
davoutMemberRequiring templates to be included outside of a component at the app root level would seem to break all the normal rules associated with component design!!
davoutMemberThe “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?
davoutMemberThanks…
How would I position the smart window so that it is aligned to the right edge of the containing component and centered vertically within the containing component?davoutMemberHello,
The ‘Angular RxJS’ article you reference in the last comment is missing the source code for ‘GetData’
… can you please include this in the article?davoutMemberThe problem is that the “resultCallbackFunction” method is being called before the http service has returned data
September 15, 2020 at 7:04 am in reply to: anchor the grid column panel form on another location? #101063davoutMemberIs there a way to pro grammatically open this column panel form from my own code?
September 14, 2020 at 10:21 am in reply to: Columns "cellsFormat' property – docs to explain options? #101055davoutMemberI can’t see a good example of how to format a number data cell to be displayed as a string value
For example…function(value: number): string {
if (value >= 1) && (value <=5) {
return ‘P’ + value;
}
else {
return ”;
}
}Suggestions?
davoutMemberThe 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.davoutMemberI want to setup a page with a small fixed number of cards. Nine cards in total – 3 cards each on 3 rows.
In terms of comparison, take a look —removed link— and how this library provides specific support for different elements within a card.August 17, 2020 at 11:47 am in reply to: How to set character width of text input control and mask inputs? #100974davoutMemberNo…. not the size of the font.
Size for the number of characters visible in the input control. I want the text input box to be able to show 30 characters without scrolling -
AuthorPosts