Why is originalObject property needed in selectedObject?
See original GitHub issueHi, I use your directive in my project, it is awesome and I like it a lot. However I can’t understand one special moment - when I define selectedObject
attribute as one of my models, I can’t use it directly, for example, to extract values from it in submit logic. All values I need are put in originalObject
property which is inside selectedObject
.
There is a workaround though - if I set selectedObject
as a function, I can set my model to whatever I want using originalObject
or anything else. But it looks a bit overcomplicated, shouldn’t this be simpler?
Issue Analytics
- State:
- Created 9 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Creating Custom Objects in PowerShell with the Original Object
The first expression adds a property that shows the number of required objects. Then I define a variable for the computername depending on...
Read more >c# - Assign object by reference - Stack Overflow
SelectedObject is an object reference. It is identical with the original object in the list - SelectedObject and the "original" object are the...
Read more >How do I save changes made inside a PropertyGrid? - MSDN
I'm using the PropertyGrid in a very simple maner: m_propertyGrid.SelectedObject = m_tileImages.Item(0) This causes all of my properties to ...
Read more >Properties Panel - Simlab Soft
This panel contains all the properties of the selected object, where the user can perform several basic operations on it, like translate, rotate,...
Read more >How to have different ComboBox choices for one property ...
... one property based on value of another property of SelectedObject ... of the associated property on the ORIGINAL object to the transform ......
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
I made these changes, you can find in https://github.com/yuceldaglar/angucomplete-alt Thanks.
Some Edits to YuniorGlez code as error originalObject of undefined was coming
function callOrAssign(value) { if (typeof scope.selectedObject === ‘function’) { scope.selectedObject(value, scope.selectedObjectData); } else if(value) { scope.selectedObject = value.originalObject; }else{ scope.selectedObject = value; } if (value) { handleRequired(true); } else { handleRequired(false); } }