Skip to content

Conversation

@BeksOmega
Copy link
Contributor

The basics

  • I branched from develop
  • My pull request is against develop
  • My code follows the style guide
  • I ran npm run format and npm run lint

The details

Resolves

Fixes #6701

Proposed Changes

Makes it so that you can set a text field to empty.

Reason for Changes

Sometimes the empty string is useful!

Test Coverage

Mostly manual testing. Also updated some change-detector tests to not fail. (gah past self)

Documentation

N/A

Additional Information

I think the issue started here: #6073

Basically, we used to be checking the text value against null and then we were checking it against '' (to see if it had changed), which was failing.

So now, instead of trying to do this weird thing to check if the value had changed, just let setValue handle it like a normal field, and set isDirty_ in the doValueUpdate_ and doValueInvalid_ functions instead of forcing a layout "manually".

@BeksOmega BeksOmega marked this pull request as ready for review December 13, 2022 18:09
@BeksOmega BeksOmega requested a review from a team as a code owner December 13, 2022 18:09
@BeksOmega BeksOmega requested a review from cpcallen December 13, 2022 18:09
@github-actions github-actions bot added the PR: fix Fixes a bug label Dec 13, 2022
@BeksOmega BeksOmega merged commit 658e14f into RaspberryPiFoundation:develop Dec 15, 2022
@maribethb maribethb mentioned this pull request Apr 13, 2023
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot create an empty text field

2 participants