mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-27 12:51:41 +00:00
* Rev up prettier * Reformat * Remove deprecated tslint * Remove call to tslint and update package-lock.json
23 lines
681 B
TypeScript
23 lines
681 B
TypeScript
import * as ko from "knockout";
|
|
import * as ReactBindingHandler from "./ReactBindingHandler";
|
|
import "../Explorer/Tables/DataTable/DataTableBindingManager";
|
|
|
|
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();
|
|
}
|
|
}
|