Skip to content

textFieldDidChange does not update row value when generic type can't be initialized #15

@eliburke

Description

@eliburke

Sorry if the title is unclear I don't really know how to summarize it better. Here's the bug: when a row is modified, textFieldDidChange constructs a new object of the appropriate type from the underlying string input. Typically this is a new string, so it works. The new value is then assigned to row.value which triggers formRow.onChange

If the data type is a URL (URLFloatLabelCell) and the string input is invalid for a URL, init will fail and the existing row.value will be assigned back to itself. This is a problem for two reasons:

  1. the user enters text that does not match the actual data
  2. onChange is not called so it is not possible to validate the input

I did not test it, but I suspect a similar failure will occur with the Decimal, Int, and Float variants.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions