Skip to content

Commit a3bf579

Browse files
authored
docs: remove duplicate QuantityFormatter migration sample (#9270)
1 parent b00b569 commit a3bf579

1 file changed

Lines changed: 1 addition & 11 deletions

File tree

docs/quantity-formatting/usage/QuantityFormatterAdvanced.md

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -206,17 +206,7 @@ Each of these events covers a different reload trigger, but they all mean the sa
206206

207207
Replace all subscriptions with [QuantityFormatter.onBeforeFormattingReady]($frontend). Register your async loading work via the [FormattingReadyCollector]($quantity) — the formatter awaits all pending work before emitting [QuantityFormatter.onFormattingReady]($frontend).
208208

209-
```ts
210-
// ✅ Provider work is awaited before formatting is considered ready
211-
const removeListener = IModelApp.quantityFormatter.onBeforeFormattingReady.addListener((collector) => {
212-
collector.addPendingWork(
213-
IModelApp.quantityFormatter.addFormattingSpecsToRegistry("MyDomain.PRESSURE", "Units.PA")
214-
);
215-
});
216-
217-
// Single unsubscribe on teardown
218-
removeListener();
219-
```
209+
See the earlier examples in this guide, especially **"Example: Domain spec provider that re-registers on reload"**, for the full provider lifecycle pattern.
220210

221211
**Option B — For tool developers and UI components** (recommended):
222212

0 commit comments

Comments
 (0)