Open egil opened 6 months ago
Code for passing response handling in htmxconfig:
public partial record HtmxConfig
{
[JsonPropertyName("responseHandling")]
public IList<ResponseHandlingRule>? ResponseHandling { get; set; }
}
public record class ResponseHandlingRule
{
public required string Code { get; set; }
public bool Swap { get; set; }
public bool? Error { get; set; }
public bool? IgnoreTitle { get; set; }
public string? Select { get; set; }
public string? Target { get; set; }
public string? SwapOverride { get; set; }
}
New swap style:
public enum SwapStyle
{
/// <summary>
/// Replace the text content of the target element, without parsing the response as HTML.
/// </summary>
/// <remarks>
/// NOTE: Available in Htmx version 2 and later.
/// </remarks>
TextContent
}
While there is only an alpha release of htmx, it makes sense that htmxor supports it. Depending on htmx release cadance, it may even be the default.
https://v2-0v2-0.htmx.org/migration-guide-htmx-1/
These are changes that likely impact htmxor directly:
htmx.config.disableInheritance
config variablehtmx.config.responseHandling
config variable