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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

When the value is cleared by clicking 'X' icon, ej2Instances.value is null

Thread ID:

Created:

Updated:

Platform:

Replies:

142857 Feb 22,2019 11:00 AM UTC Feb 27,2019 06:00 AM UTC Vue 3
loading
Tags: InPlaceEditor
Jzy
Asked On February 25, 2019 10:22 AM UTC

Hi,

There is one in-place editor with following properties:

        :ref="ed" type="DropDownList" mode= "Inline"  data-underline="false" actionOnBlur="Submit" :model="repeatDropDownModel" :value="a" :showButtons=false emptyText="b"

     repeatDropDownModel :{
         dataSource:['a','b','c']
     }

When I clear the editor value by clicking 'X' icon in editing mode, 'b' will be displayed on the field, however, this.$refs.ed[0].ej2Instances.value becomes null. Should it be 'b' as well? 

And if I click the editor again, 'a' will be displayed instead of 'b' in the editing mode, I am confused.

Thanks,
Jzy

Prince Oliver [Syncfusion]
Replied On February 25, 2019 12:43 PM UTC

Hi Jzy, 

Thank you for contacting Syncfusion support. 

The emptyText is applied to in-place editor when it is submitted with `null` or `undefined` or `empty string`. If you clear the DropDownList input data, null value is updated into dropdownlist alone (it is not reflected to In-place Editor’s value property). After submitting the editor, value property is set as null and emptyText will set to DOM. 

Refer below documentation link for more details 


We have prepared sample for your reference, check the below link 


In the above sample, open an editor then press clear icon in dropdownlist component, now you can see the input is cleared. Then click outside of In-place Editor element, value will submit because sample configured with actionOnBlur as Submit. emptyText property value of 'Select value' is now set to DOM, but it is not updated in editor value property. if you open the editor again, the last  updated value in the value property will be assigned in the dropdown's input 

Regards, 
Prince 


Jzy
Replied On February 27, 2019 02:43 AM UTC

Hi,

Thank you for your help. 

So I should set emptyText value to be 'select one value' instead of one value of the list directly. 

Prince Oliver [Syncfusion]
Replied On February 27, 2019 06:00 AM UTC

Hi Jzy, 

Most Welcome. We are glad to help you. Yes, the emptyText property behave like as placeholder here. 

Regards, 
Prince 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon