Closed sinall closed 4 years ago
Maybe this previous issue with help #521
@ckosloski The user case is different. In my case, I want to change the display value
, regardless it is triggered by dropdown or a button. I don't want to save the display value
to model
until user click the save
button.
The real case is like this:
[0 0/1 9 * or 2020-05-29 09:40:00] => I want to change view value of this input
[CRON or FIXED_TIME] => if a new option is selected
I use single input field to save the expression
which could be a CRON
expression or a DATA TIME
expression. So it will have very different formats according to its type.
For example:
[2020-05-29 09:40:00] => change display value to empty
[FIXED_TIME] => if option is changed to CRON
In this case, I want only the view value
get changed, if will be saved to model if save
is clicked or will be discard if cancel
is clicked.
I guess I could use jQuery
to change the input value, but I don't what will happen, and I don't know if angular-xeditable have such API
to achieve this.
@ckosloski Demo
It can‘t be saved into model when save
is clicked. So the view-model binding is broken. Somehow this method is different from user manually change.
Are you referring to the error message Username should be `awesome` or `error
?
That was in the original demo link you posted.
Are you referring to the error message
Username should be `awesome` or `error
? That was in the original demo link you posted.
No, I changed the link several times, it should be this demo.
@ckosloski Thanks you, it works!
I have a dropdown and a text input, when editing, I want to change the text of the input if dropdown is changed.
[some text] => I want to change view value of this input [dropdown] => if a new option is selected
I tried to set
editableForm['name of input']['$viewValue']
or seteditableForm.$data['name of input']
, but didn't work.Here's the demo.