mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-22 10:21:37 +00:00
21 lines
616 B
TypeScript
21 lines
616 B
TypeScript
import * as ko from "knockout";
|
|
import * as ReactBindingHandler from "./ReactBindingHandler";
|
|
export class BindingHandlersRegisterer {
|
|
public static registerBindingHandlers() {
|
|
ko.bindingHandlers.setTemplateReady = {
|
|
init(
|
|
element: any,
|
|
wrappedValueAccessor: () => any,
|
|
allBindings?: ko.AllBindings,
|
|
viewModel?: any,
|
|
bindingContext?: ko.BindingContext
|
|
) {
|
|
const value = ko.unwrap(wrappedValueAccessor());
|
|
bindingContext?.$data.isTemplateReady(value);
|
|
},
|
|
} as ko.BindingHandler;
|
|
|
|
ReactBindingHandler.Registerer.register();
|
|
}
|
|
}
|