Parser: skip unit suffix when next ident is a comparison keyword (starts, ends, contains, matches, is, does, in, precedes, follows). Fixes "123 starts with '12'" returning "123starts" instead of true. eval-hs: use hs-compile directly instead of hs-to-sx-from-source with "return " prefix, which was causing the parser to consume the comparison as a string suffix. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
17 lines
1.0 KiB
Plaintext
17 lines
1.0 KiB
Plaintext
(defcomp
|
|
()
|
|
(~examples/page-content
|
|
:title "Edit Row"
|
|
:description "Click edit to replace a table row with input fields. Save or cancel swaps back the display row. Uses sx-include to gather form values from the row."
|
|
:demo-description "Click edit on any row to modify it inline."
|
|
:demo (~examples/edit-row-demo
|
|
:rows (list
|
|
(list "1" "Widget A" "19.99" "142")
|
|
(list "2" "Widget B" "24.50" "89")
|
|
(list "3" "Widget C" "12.00" "305")
|
|
(list "4" "Widget D" "45.00" "67")))
|
|
:sx-code "(button\n :sx-get \"/sx/(geography.(hypermedia.(example.(api.(editrow.1)))))\"\n :sx-target \"#erow-1\"\n :sx-swap \"outerHTML\"\n \"edit\")\n\n;; Save sends form data via POST\n(button\n :sx-post \"/sx/(geography.(hypermedia.(example.(api.(editrow.1)))))\"\n :sx-target \"#erow-1\"\n :sx-swap \"outerHTML\"\n :sx-include \"#erow-1\"\n \"save\")"
|
|
:handler-names (list "ex-editrow-form" "ex-editrow-save")
|
|
:comp-placeholder-id "editrow-comp"
|
|
:wire-placeholder-id "editrow-wire"))
|