You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Try updating the value of a candidate's elected status (i.e. true -> false)
Press save.
Note that rather than successfully saving, an error is thrown. If you go into the Network tab of your devtools and look at the response under http://localhost:3000/api/data?path=documents/elections, you'll see why. The backend expected a boolean for elected, but received a string.
This is because the EditorLabelNode only handles strings at the moment. It's our fallback for all non-object data types, so even though the elected is a boolean, we're using EditorLabelNode anyway.
Steps to solve:
Let's make a new EditorNode subclass to handle booleans. Displaying a checkbox input element would work, among other options.
The text was updated successfully, but these errors were encountered:
There's a bug we need to fix around the admin editor.
Steps to replicate:
elected
status (i.e. true -> false)elected
, but received a string.This is because the EditorLabelNode only handles strings at the moment. It's our fallback for all non-object data types, so even though the
elected
is a boolean, we're using EditorLabelNode anyway.Steps to solve:
Let's make a new
EditorNode
subclass to handle booleans. Displaying a checkboxinput
element would work, among other options.The text was updated successfully, but these errors were encountered: