Is there any way to disable only some elements based on some condition ? #1305
-
I need to show a list when the first element would be disable by default. Is there any way to do it ? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
Hello, |
Beta Was this translation helpful? Give feedback.
-
Hi, thanks for the help but actually now that i am reading it I think i did not explain my question properly. I want to have one element selected and disabled from the selected values below. So, user can not remove, lets say |
Beta Was this translation helpful? Give feedback.
-
Ok sorry, I can't help much more unfortunately 😐. |
Beta Was this translation helpful? Give feedback.
-
You can achieve this using a watcher; |
Beta Was this translation helpful? Give feedback.
-
@kamerat's solution here is the way to go! |
Beta Was this translation helpful? Give feedback.
You can achieve this using a watcher;
Once the un-deletable is no longer in the array, overwrite array with previous value (the one where they are)
https://codepen.io/kamerat/pen/JjKVKoK