Conversation
| const hasValue = value !== ""; | ||
| const displayValue = hasValue ? value.toString() : EMPTY_FIELD; | ||
|
|
||
| const valueElement = displayOverride && hasValue |
There was a problem hiding this comment.
I was just annoyed wanting to show a list of values and wanted to be able to customize that to not be a paragraph. Only change here.
| formClassName, | ||
| }) => { | ||
|
|
||
| const dispatch = useDispatch(); |
There was a problem hiding this comment.
really not significantly different than existing FormWrapper, extracted this out from there
| if (!isEditMode && forceRedux) { | ||
| return getFormValues(props.name)(state); | ||
| } | ||
| return props.initialValues; |
There was a problem hiding this comment.
keeping values fresh so that view forms that call change and similar function properly. 🤦♀️
| showTimezones, | ||
| } = props; | ||
|
|
||
| const { isEditMode } = useContext(FormContext); |
There was a problem hiding this comment.
did some little view modes for input types that didn't have them yet
| import RenderTreeSelect from "./RenderTreeSelect"; | ||
| import { normalizeDatetime } from "@mds/common/redux/utils/helpers"; | ||
|
|
||
| const initialValues = { |
There was a problem hiding this comment.
the big test!
Put in all the input components. Did some field nesting. Make sure something sensible is returned (nothing crashes, values show up). Couple things I decided not to worry about because nowhere in the system does it matter (RenderCascader, Fields). If it becomes necessary in the future we'll deal with it then.
| const { id, tab } = useParams<{ id: string, tab: string }>(); | ||
| const showNullScreen = !location.state && !id; | ||
| const [fixedTop, setFixedTop] = useState(false); | ||
| const fixedTopRef = React.useRef(fixedTop); |
There was a problem hiding this comment.
I ended up converting this one to TS first. Aaaand I should probably have brought the fixedTopRef bit over to ScrollSidePageWrapper. Kept it because it was done and it works.
| const formErrors = useSelector(getFormSubmitErrors(name)); | ||
|
|
||
| const handleSubmit = async (values) => { | ||
| console.log('handleSubmit', name, values) |
matbusby-fw
left a comment
There was a problem hiding this comment.
Looking great! Just found the one console log still there.
|
|
|







Objective
MDS-6622