Passing values shouldn't treat value property as value
See original GitHub issueconst fields = [
'inventoryLevel.value',
];
const values = {
inventoryLevel: {
value: 2,
},
};
const form = new Form({ fields, values });
console.log(form.$('inventoryLevel')); // Output: 2
console.log(form.$('inventoryLevel.value')); // Error
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
pass by value - Is it a good practice to change arguments in Java
It's considered bad practice in general, though some people overlook it as you can see in the other answers. For parameters like primitives...
Read more >Pass-by-value, reference, and assignment | Pydon't - Mathspp
This article explains why Python doesn't use a pass-by-value system, nor a pass-by-reference.
Read more >4. Methods Use Instance Variables: How Objects Behave
A method can have parameters, which means you can pass one or more values in to the method. The number and type of...
Read more >Objects - The Modern JavaScript Tutorial
A property is a “key: value” pair, where key is a string (also called a “property name”), and value can be anything. We...
Read more >Properties — The Swift Programming Language (Swift 5.7)
Properties associate values with a particular class, structure, or enumeration. Stored properties store constant and variable values as part of an instance, ...
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 FreeTop 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
Top GitHub Comments
Should work now.
I made more tests and I think I will not remove the
unified properties
anymore. The code is deeply glued to both styles and would be a pain to rewrite all.Using the
$
as prop prefix will fix this issue, but I think we should deprecate theunified properties
on the long term, if we remove them the code will be better (no more confusion on syntax to use and the build will be smaller). Using theseparated properties
is more flexible I think. I’m also having other issues on managing the state of theunified properties
, additional code should be added to fix nested fields props when are updated, and it seems a bit tricky.