Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multiple bugs with additionalProperties component #1099

Closed
2 tasks done
aerfio opened this issue Dec 6, 2018 · 5 comments · Fixed by #1123
Closed
2 tasks done

multiple bugs with additionalProperties component #1099

aerfio opened this issue Dec 6, 2018 · 5 comments · Fixed by #1123

Comments

@aerfio
Copy link
Contributor

aerfio commented Dec 6, 2018

Prerequisites

  • I have read the documentation;
  • In the case of a bug report, I understand that providing a SSCCE example is tremendously useful to the maintainers.

Description

  • There is no option to remove key-value pair once it's added
  • Key changes name when doubleclicked
  • Key-value pair also sometimes change position, when you add more pairs, change their keys and doubleclick again

Steps to Reproduce

  1. Loot at provided jsfiddle
  2. Doubleclick "newKey Key"
  3. It changes name to "newKey-1 Key"
  4. Doubleclick again
  5. "newKey-1-1 Key"
  6. add one more pair
  7. click key again
  8. they should change their order

https://jsfiddle.net/aerfio/mynuxdc4/

Expected behavior

I expect to have option to remove once added key-value pair and to preserve order of those pairs.

Actual behavior

No "remove/delete/X" button, ordering is not preserved

Version

1.0.6

Related: #228

@aerfio
Copy link
Contributor Author

aerfio commented Dec 6, 2018

@christianclent, can you have a look at this? Are working on this, can we help somehow?

@aerfio aerfio changed the title additionalProperties has no option to remove added key-value pair multiple bugs with additionalProperties component Dec 6, 2018
@domharrington
Copy link
Contributor

domharrington commented Dec 17, 2018

Some other issues I've discovered:

  • When your cursor is inside the "key" input, pressing tab has the same effect of renaming to append -1 to the name.
  • Key changes dont apply until focus on the input is lost. Could this happen in real time?
  • Deleting all of the characters inside of the value results in an unrecoverable error:
Unsupported field schema for field root_newKey: Unknown field type null.

{
  "type": "null",
  "__additional_property": true,
  "format": ""
}

@domharrington
Copy link
Contributor

@loganvolkers
Copy link
Contributor

Wow, so many bugs with additional properties.

This should have been released on an alpha branch, as it's clearly early functionality that create backwards incompatible renderings of forms and functionality.

@glasserc
Copy link
Contributor

#1123 is listed as fixing all these issues. Please try it and let me know.

additionalProperties was marked as "preliminary" in #1021 and I didn't expect it to be perfect, but as forms don't get the functionality unless they include an additionalProperties field, it seemed like it was opt-in and not a problem to just release. Sorry if the preliminary nature of the feature wasn't communicated clearly. However, I don't think "releasing it on an alpha branch" would have helped since my impression is that people only want to use rjsf via the latest npm release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants