yesod-form-multi 1.7.0 → 1.7.0.1
raw patch · 3 files changed
+11/−2 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- ChangeLog.md +6/−0
- Yesod/Form/MultiInput.hs +4/−1
- yesod-form-multi.cabal +1/−1
ChangeLog.md view
@@ -1,5 +1,11 @@ # Changelog +## 1.7.0.1++[#1716](https://github.com/yesodweb/yesod/pull/1716)++* Fixed bug where duplicating `<option>` tags caused the `value` field to be cleared+ ## 1.7.0 [#1707](https://github.com/yesodweb/yesod/pull/1707)
Yesod/Form/MultiInput.hs view
@@ -304,11 +304,14 @@ // input types where we don't want to reset the value const keepValueTypes = ["radio", "checkbox", "button"]; + var shouldKeep = keepValueTypes.includes(e.prop('type'))+ || e.prop("tagName") == "OPTION";+ // uncheck any checkboxes or radio fields and empty any text boxes if(e.prop('checked') == true) e.prop('checked', false); - if(!keepValueTypes.includes(e.prop('type')))+ if(!shouldKeep) e.val("").trigger("change"); // trigger change is to ensure WYSIWYG editors are updated // when their hidden code field is cleared
yesod-form-multi.cabal view
@@ -1,5 +1,5 @@ name: yesod-form-multi-version: 1.7.0+version: 1.7.0.1 license: MIT license-file: LICENSE author: James Burton <jamesejburton@gmail.com>