Commit 903f220
committed
Fix combobox field attribute not sending values to form params
Fixed #440
- Remove `default: nil` from `attr :name` to match Phoenix core_components
pattern, allowing `assign_new` to properly set name from form field
- Add `assign_new(:name, fn -> nil end)` in non-field function heads
for standalone usage without form
- Fix JS createNewOption reply callback to update label and value
independently instead of skipping when only label changes
- Fix `_target: ["undefined"]` in phx-change by stopping search input
event propagation to parent form
- Extract `refreshSelectedDisplay` and `handleCreateReply` in JS hook1 parent 930f91c commit 903f220
2 files changed
+34
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
330 | 330 | | |
331 | 331 | | |
332 | 332 | | |
| 333 | + | |
333 | 334 | | |
334 | 335 | | |
335 | 336 | | |
| |||
755 | 756 | | |
756 | 757 | | |
757 | 758 | | |
758 | | - | |
759 | | - | |
760 | | - | |
761 | | - | |
| 759 | + | |
762 | 760 | | |
763 | 761 | | |
764 | 762 | | |
765 | 763 | | |
766 | 764 | | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
767 | 793 | | |
768 | 794 | | |
769 | 795 | | |
| |||
835 | 861 | | |
836 | 862 | | |
837 | 863 | | |
838 | | - | |
839 | | - | |
840 | | - | |
841 | | - | |
842 | | - | |
843 | | - | |
844 | | - | |
845 | | - | |
846 | | - | |
847 | | - | |
848 | | - | |
849 | | - | |
850 | | - | |
851 | | - | |
852 | | - | |
853 | | - | |
854 | | - | |
855 | | - | |
| 864 | + | |
856 | 865 | | |
857 | 866 | | |
858 | 867 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
| 167 | + | |
167 | 168 | | |
168 | 169 | | |
169 | 170 | | |
| |||
386 | 387 | | |
387 | 388 | | |
388 | 389 | | |
| 390 | + | |
389 | 391 | | |
390 | 392 | | |
391 | 393 | | |
| |||
0 commit comments