Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/articles/migrate-to-v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -408,8 +408,8 @@ See [History updates](responses.md#history-updates).
| `Target` | `Target` |
| `Swap` | `Swap` for a swap style; `SwapExpression` for a style with modifiers |
| `Select` | `Select` |
| `Values` (`object`) | `Values` (`IDictionary<string, HtmxFieldValues>`) |
| `Headers` (`object`) | `Headers` (`IDictionary<string, string>`) |
| `Values` (`object`) | `Values` (`IReadOnlyDictionary<string, HtmxFieldValues>`) |
| `Headers` (`object`) | `Headers` (`IReadOnlyDictionary<string, string>`) |
| `Event`, `Handler` | Removed: HTMX expects a live browser event and a JavaScript function, which JSON cannot carry |
| — | New: `SelectOob`, `HistoryUrl`, `HistoryAction` |

Expand Down
4 changes: 2 additions & 2 deletions src/Ramstack.HtmxToolkit/HtmxLocationOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public HtmxSwap? Swap
/// HTMX 4.0.0 converts an array to a single comma-separated field value.
/// </para>
/// </remarks>
public IDictionary<string, HtmxFieldValues>? Values { get; set; }
public IReadOnlyDictionary<string, HtmxFieldValues>? Values { get; set; }

/// <summary>
/// Gets or sets the headers to include with the request.
Expand All @@ -66,7 +66,7 @@ public HtmxSwap? Swap
/// Pass complex data as a pre-serialized JSON string.
/// </para>
/// </remarks>
public IDictionary<string, string>? Headers { get; set; }
public IReadOnlyDictionary<string, string>? Headers { get; set; }

/// <summary>
/// Gets or sets a CSS selector used to filter the content to swap from the response.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ internal readonly struct HtmxLocationOptionsJsonView(string path, HtmxLocationOp
/// <summary>
/// Gets the form field values.
/// </summary>
public IDictionary<string, HtmxFieldValues>? Values => options.Values;
public IReadOnlyDictionary<string, HtmxFieldValues>? Values => options.Values;

/// <summary>
/// Gets the request headers.
/// </summary>
public IDictionary<string, string>? Headers => options.Headers;
public IReadOnlyDictionary<string, string>? Headers => options.Headers;

/// <summary>
/// Gets the content selector.
Expand Down
Loading