LearnNewsExamplesServices
Frontmatter
id5082
titleform.field.Text: add a trim() logic for submitting values
stateClosed
labels
enhancement
assigneestobiu
createdAtNov 4, 2023, 5:44 PM
updatedAtNov 6, 2023, 12:04 PM
githubUrlhttps://github.com/neomjs/neo/issues/5082
authortobiu
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtNov 6, 2023, 12:04 PM

form.field.Text: add a trim() logic for submitting values

Closed v8.1.0 enhancement
tobiu
tobiu commented on Nov 4, 2023, 5:44 PM

@linchen, @ThorstenRaab: i had to revert your idea for a fix: https://github.com/neomjs/neo/pull/5081

since it was causing multiple new bugs. e.g. NumberField extends TextField. so if you just transform whatever type of value which is coming in into a string, it will break.

also, we do need a proper if condition for:

data.value ? data.value.toString().trim() : me.emptyValue

if data.value equals 0, it will get changed to the emptyValue.

tobiu added the enhancement label on Nov 4, 2023, 5:44 PM
tobiu assigned to @tobiu on Nov 4, 2023, 5:44 PM
tobiu referenced in commit 6b09495 - "form.field.Text: add a trim() logic for submitting values #5082" on Nov 4, 2023, 6:23 PM
tobiu
tobiu Nov 4, 2023, 6:23 PM

^ we can probably go for this one, in case we only want to trim user inputs and not programmatic values.

tobiu referenced in commit 38e1574 - "#5082 onFocusLeave() => trim()" on Nov 6, 2023, 11:45 AM
tobiu closed this issue on Nov 6, 2023, 12:04 PM
tobiu referenced in commit 0d464f5 - "v6.9.9 (#5084) on Nov 6, 2023, 12:11 PM