[Dynamic Form] Fix for 1788/1794 and add styles property for support customizing styling #1913
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.
What's in this Pull Request?
This PR is mainly for
Dynamic Form has quite a lot of problems when custom list formatting is enabled. I fixed the issues ([Dynamic Form] Cannot read properties of undefined (reading 'sections') #1788 ,[Dynamic Form] Implement @class extensibility for DynamicForm and DynamicField, add onPreRender delegate. #1794 Bad UI) .
The author of [Dynamic Form] Implement @class extensibility for DynamicForm and DynamicField, add onPreRender delegate. #1794 provided some other approach to customize the styling but I feel this PR should work.
Now it will show 3 columns per row if it has custom form layout
Added two properties (styles and className) to support customization on styling and converted this component as style-able component. Deleted the /dynamicForm/DynamicForm.module.scss file and put its content into /dynamicForm/DynamicForm.sytles.ts and /dynamicForm/dynamicField/DynamicField.styles.ts . I kept the same classname on styling to make this change smoothly.
I have documented the new feature on DynamicForm.md and given an example how to overwrite styling
I know it is quite a big change, please let me know if anything missing.
Guidance