You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Framework/Framework/Controls/KnockoutHelper.cs
+8-7Lines changed: 8 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -116,7 +116,7 @@ public static void AddKnockoutForeachDataBind(this IHtmlWriter writer, string ex
116
116
/// <summary> Generates a function expression that invokes the command with specified commandArguments. Creates code like `(...commandArguments) => dotvvm.postBack(...)` </summary>
/// <summary> Options for the <see cref="KnockoutHelper.GenerateClientPostBackExpression(string, Binding.Expressions.ICommandBinding, DotvvmBindableObject, PostbackScriptOptions)" /> method. </summary>
9
9
publicsealedrecordPostbackScriptOptions
10
10
{
11
-
/// <summary>If true, the command invocation will be wrapped in window.setTimeout with timeout 0. This is necessary for some event handlers, when the handler is invoked before the change is actually applied.</summary>
12
-
publicboolUseWindowSetTimeout{get;init;}
13
-
/// <summary>Return value of the event handler. If set to false, the script will also include event.stopPropagation()</summary>
11
+
/// <summary>If true, the command invocation will be wrapped in window.setTimeout with timeout 0. This is necessary for some event handlers, when the handler is invoked before the change is actually applied. Default is false</summary>
12
+
publicbool?UseWindowSetTimeout{get;init;}
13
+
/// <summary>Return value of the event handler. If set to false, the script will also include event.stopPropagation(). Null means that `null` will be returned.</summary>
14
14
publicbool?ReturnValue{get;init;}
15
-
publicboolIsOnChange{get;init;}
15
+
/// <summary> When true, the invocation is suppressed while viewmodel is being updated. Default is false. </summary>
16
+
publicbool?IsOnChange{get;init;}
16
17
/// <summary>Javascript variable where the sender element can be found. Set to $element when in knockout binding.</summary>
/// <summary>When set to false, postback handlers will not be invoked for this command.</summary>
23
-
publicboolAllowPostbackHandlers{get;init;}
23
+
/// <summary>When set to false, postback handlers will not be invoked for this command. Default is true.</summary>
24
+
publicbool?AllowPostbackHandlers{get;init;}
24
25
/// <summary>Javascript expression returning <see href="https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal">AbortSignal</see> which can be used to cancel the postback (it's a JS variant of CancellationToken). </summary>
/// <param name="useWindowSetTimeout">If true, the command invocation will be wrapped in window.setTimeout with timeout 0. This is necessary for some event handlers, when the handler is invoked before the change is actually applied.</param>
29
30
/// <param name="returnValue">Return value of the event handler. If set to false, the script will also include event.stopPropagation()</param>
30
31
/// <param name="isOnChange">If set to true, the command will be suppressed during updating of view model. This is necessary for certain onChange events, if we don't want to trigger the command when the view model changes.</param>
31
-
/// <param name="elementAccessor">Javascript variable where the sender element can be found. Set to $element when in knockout binding.</param>
32
+
/// <param name="elementAccessor">Javascript variable where the sender element can be found. Set to $element when in knockout binding, and this when in JS event.</param>
32
33
/// <param name="koContext">Javascript variable current knockout binding context can be found. By default, `ko.contextFor({elementAccessor})` is used</param>
33
34
/// <param name="commandArgs">Javascript expression returning an array of command arguments.</param>
34
35
/// <param name="allowPostbackHandlers">When set to false, postback handlers will not be invoked for this command.</param>
35
36
/// <param name="abortSignal">Javascript expression returning <see href="https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal">AbortSignal</see> which can be used to cancel the postback (it's a JS variant of CancellationToken). </param>
0 commit comments