We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Is there a way to determine which in-place editor is used if its url property value is set to be empty?

Hi,

There are lots of in-place editors on one page identified by different ref property and name property and primaryKey property like this:

    ref="caseNameEditor" type="Text" mode="Popup"  data-underline="false" actionOnBlur="Cancel"
   :actionSuccess= "onActionSuccess"
   :value=case_basicinfo.case_name :model="caseNameModel"
   :popupSettings="textpopupsettings"
   name="caseName" primaryKey="caseName"

I want to handle data locally and hence url property values of them are set to be empty. 

According to this sentence: 'If the URL property value is empty, data passing will handled at local and also the actionSuccess event will trigger with null as argument value.'

I can see that the e argument in 'actionSuccess: function(e) {}' has three sub-parameters as follows:
    
    e: {
        data:{}, ---- this one is empty
        name: actionSuccess
        value: new_value
    }

How can I get the properties of in-place editor to determine which one is used once its actionSuccess event is triggered?

Thanks, 
Jzy

3 Replies

PO Prince Oliver Syncfusion Team February 20, 2019 11:28 AM UTC

Hi Brett, 

Thank you for using Syncfusion products. 

You can get editor reference when an actionSuccess event is triggered. To achieve this need to pass In-place Editor’s component reference into actionSuccess event definition and then configure v-on directives to this definition. Kindly refer to the following code. 

v-on:actionSuccess="success($event, $refs.editObj1)" 
 
// $event - Arguments of In-place Editor success event 
// $refs.editObj1 - Additional argument which holding current editor reference. 

Configure success event and access editor element’s instances as shown below. 

success: function(successArgs, editRef) { 
    console.log(successArgs); // Success event arguments 
    console.log(editRef.$el); // Event triggered In-place Editor element 
    console.log(editRef.ej2Instances); // Event triggered In-place editor instance 
} 

We have prepared sample based on your requirement, please find the sample at the following link 

Please let us know if you need any further assistance on this. 

Regards, 
Prince 



JZ Jzy February 21, 2019 07:28 AM UTC

Hi Prince,

Thank you so much for your help! This does work!

Thanks,
Jzy




PO Prince Oliver Syncfusion Team February 22, 2019 05:03 AM UTC

Hi Jzy, 

Most Welcome. 

We are glad to help you. 

Regards, 
Prince 


Loader.
Live Chat Icon For mobile
Up arrow icon