DevExtreme React - Change Options
To be able to change a UI component property, declare its value an observable.
JavaScript
var viewModel = { checkBoxOptions: { // ... value: ko.observable(true) } }; viewModel.changeObservables = function () { viewModel.checkBoxOptions.value(false); }; ko.applyBindings(viewModel);
Now, if you change an observable in code, the UI component will receive the changes and update the UI. And vice versa, if a user changes something in the UI, the observable gets updated.
NOTE
Propertiescontaining array and specified on the second (or further) level of the configuration object cannot be made observable.
See Also
- API Reference.WidgetName.Configuration, for example, API Reference.CheckBox.Configuration
- Create and Configure a Widget
Feel free to share topic-related thoughts here.
If you have technical questions, please create a support ticket in the DevExpress Support Center.
Thank you for the feedback!
If you have technical questions, please create a support ticket in the DevExpress Support Center.