-
Notifications
You must be signed in to change notification settings - Fork 540
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
[JavaScript][Deregistering a property from the parser/render] #4414
Comments
@mokandre This is actually already supported, via the SrializableObject.onRegisterCustomProperties event. Example: Adaptive.SerializableObject.onRegisterCustomProperties = (sender: Adaptive.SerializableObject, schema: Adaptive.SerializableObjectSchema) => {
if (sender instanceof Adaptive.TextBlock) {
schema.remove(Adaptive.TextBlock.heightProperty);
}
} Can you please try this and close this issue if that solves your problem? |
@dclaux Able to deregister some of the properties but
|
@mokandre I will implement another model for property deregistration. I could just fix the bug you mentioned, but I fear there will be more such bugs as the renderer expects and needs some properties to be registered. As for fallback, it is not handled as a property internally and therefore cannot be unregistered. Fallback is mainly a parse-time feature, and fallback elements are not parsed if they are not needed. I will add a global flag to disable fallback. |
🎉 Handy links: |
What platform is your feature request related to?
Is your feature request related to a problem? Please describe.
We would like to disable the functionality of unsupported properties on parser/render
Describe the solution you'd like
It would be great to have a way to
Deregister a property from the parser/render
Deregister has to work for the following cases:
Height
property ofcolumnSet
)verticalContentAlignment
property for all the elements where it supports)For Example
Unsupported Property :
maxLines
forTextBlock
element.After deregistering a property, though users try to add
maxLines
property to their JSON then that property shouldn't render/parse.Current behavior:
If possible, validator have to point out that the unsupported properties are not supported as warning message
For Example:(Warning Message)
Unknown/Unsupported property :
maxLines
ofTextBlock
ElementThe text was updated successfully, but these errors were encountered: