question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Why is originalObject property needed in selectedObject?

See original GitHub issue

Hi, 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:closed
  • Created 9 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
yuceldaglarcommented, Dec 14, 2018

I made these changes, you can find in https://github.com/yuceldaglar/angucomplete-alt Thanks.

1reaction
atul121001commented, Jun 1, 2017

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); } }

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found