Closed sudiptochoudhury closed 5 years ago
@sudiptochoudhury If you are changing the question.name in question directly, via in-place editing (using our adorners), then you are changing the question.title. I have just tried to change question name via property grid and question editor, it works as expected.
Thank you, Andrew
You can set the inplaceEditForValues editor property to true
to turn on inplace editing for values.
@andrewtelnov. I am not sure but I am not trying to change the title. I will come to later on whether question.title or question.name. That concern is secondary for now. The main concern is "the change is not saving". The popup in the user interface that comes up when I click edit button shows a field whose label is shown as "Name". There is another field in that popup, whose label is shown as "Title". So, I think if the UI is not badly conceived, then it's pretty clear from the user interface labels, that one refers to "Name" and another refers to "Title". Let's forget about all these names. Issue is simpler. Here are the steps to reproduce as images:
I was also wondering whether the value in Local Storage is getting changed, no it is not as you can see in the image below, the "name" property has not changed!
@tsv2013 The current issue is not about editing in-place, nor about which variable stores it. I want to change value via the Edit popup and the value is not getting stored.
@sudiptochoudhury I have tried it with several browsers and it works fine in all of them. Probably something wrong with local storage in your browser. Could you please try this example?
Thank you, Andrew
@andrewtelnov The example you have just provided works correctly in the same browser.
@sudiptochoudhury It means that somehow the localstorage doesn't work correctly on your browser and it rollbacks the changes. I have no idea why. I am seeing this for the first time. Could you please try to create a survey in our Service area (it is completely free, but you would have to register)? It stores Survey JSON in azure database instead of local storage.
Thank you, Andrew
@andrewtelnov You may be right. But I in my own implementation I am not using local storage or can not find any thing in the local storage. Not sure if SurveyJS automatically uses LocalStorage or not.
However, I did one more investigation. I tried onPropertyValueChanging
event listener and in your example whenever I change the name
it get this even triggered. But not triggering in my implementation. It is triggering for other items like for "is required" or "is visible" settings.
I need to mention one thing, my implementation uses
editor = new SurveyEditor.SurveyEditor(null);
and then render after defining event listeners:
editor.render("editorElement", editorOptions);
Can it make the difference?
@sudiptochoudhury We use localstorage on our web page and do not use it in our libraries. It means that the problem in you code onPropertyValueChanging. This event allows to discard changes, for example. You may show your code on this event then.
Thank you, Andrew
@sudiptochoudhury As for your question. Here is the updated plunker with render function. You may try to recreate the problem in the plunker so we will be able to find out the reason of this behavior.
Thank you, Andrew
Are you requesting a feature, reporting a bug or ask a question?
Bug
What is the current behavior?
Unable to set a custom name to a question.
What is the expected behavior?
Ability to set custom names for questions.
How would you reproduce the current behavior (if this is a bug)?
Provide the test code and the tested page URL (if applicable)
Tested page URL: https://surveyjs.io/Survey/Builder/
Specify your