setAttributes should be exposed for overriding on the autofields object
See original GitHub issueIt would be helpful (and make this plugin more useful/extensible) if setAttributes
was exposed for overriding (monkey-patching) on the autofields
object.
If a consumer wants to override that method, currently they have to do the following (in addition to writing their own implementation):
- Create a local dictionary of mutators & overriding
registerMutator
to use that - Duplicating
getLabel
&getInput
& modifying them to use the replacementsetAttributes
implementation - Duplicating
getFieldContainer
& modifying it to use the replacementsetAttributes
implementation - Overriding the field method (
$autofieldsProvider.field
) with an implementation that uses the customgetFieldContainer
imlpementation. This will use the local dictionary of mutators.
All that could be avoided if Autofields exposed (and used) setAttributes
on the autofields
object.
As a less pressing issue, it would be handy if the helper
(i.e. CamelToTitle
etc) was exposed too.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
setAttribute without overriding another class attribute [duplicate]
I have created a code that when you select an option in a select to the body of my website includes a new...
Read more >Overriding Metadata Generated by a Transformation
You can override object and field attributes. For example, you can change a field name that is extracted from a Salesforce object so...
Read more >Element.setAttribute() - Web APIs | MDN
Sets the value of an attribute on the specified element. If the attribute already exists, the value is updated; otherwise a new attribute...
Read more >pyfields
pyfields provides a simple and elegant way to define fields in python classes. With pyfields you explicitly define all aspects of a field...
Read more >Overwriting attribute in super-class or sub-class - CodeQL
Subclasses should not set attributes that are set in the superclass. ... #Attribute set in both superclass and subclass class C(object): def __init__(self): ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Pulled. Thanks for that!
PR #64 submitted 😃