You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this example, any string value will be clickable. When clicked, it will be
108
+
copied to the clipboard.
109
+
110
+
#### Combining Handlers
111
+
112
+
Custom handlers can be combined alongside the built-in ones (such as the URL
113
+
handler). To apply all of the default built-in handlers, you can import the `VALUE_CLICK_HANDLERS` array and spread it into your `customValueClickHandlers`
114
+
array. Alternatively, handlers be the imported individually via
115
+
`ValueClickHandlers`.
116
+
117
+
```typescript
118
+
import {
119
+
ValueClickHandlers,
120
+
VALUE_CLICK_HANDLERS,
121
+
} from'ngx-json-treeview';
122
+
123
+
customValueClickHandlers: ValueClickHandler[] = [
124
+
...VALUE_CLICK_HANDLERS,
125
+
this.copyToClipboardHandler,
126
+
];
127
+
128
+
// OR
129
+
130
+
customValueClickHandlers: ValueClickHandler[] = [
131
+
ValueClickHandlers.followLinkHandler,
132
+
this.copyToClipboardHandler,
133
+
];
134
+
```
135
+
136
+
In this example, any string that matches a URL will trigger the `followLinkHandler`, and all other strings will trigger the `copyToClipboardHandler`.
137
+
52
138
## Theming
53
139
54
140
You can customize the appearance of the tree view using these CSS variables:
0 commit comments