This repository was archived by the owner on May 17, 2021. It is now read-only.
COMPASS-3961: allow adding missing fields #19
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Adds a
+ ADD FIELD
button with an input field in export-fields modal.Motivation and Context
+ ADD FIELD
button scrolls over to the bottom of the table and focuses on the input field to be edited. The field is only saved onenter
, which is indicated by the text on the side of the table. When the input field is submitted,fields
props are updated and the component is refreshed. That particular field is saved even after the user goes toOUTPUT
and comes back toFIELDS
.Open Questions
Currently once I hit enter to save the currently edited field, I am not able to prevent the modal from scrolling up a bit. This happens because the element is rerendering, so I understand that the state just changed and the focus was lost. Anyone have an idea as to how to get the focus back to the previous state, aka the input field at the bottom after the rerender?
Types of changes