From 045af6f3b9e88d6373d67eec1f1080886c2d0f2a Mon Sep 17 00:00:00 2001 From: AlexElin Date: Tue, 9 Mar 2021 23:52:14 +0300 Subject: [PATCH] docs: monospace DataSource (table docs) (#22114) (cherry picked from commit 0950cd5466466287a83e7a25c471590a7e409407) --- src/material/table/table.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/material/table/table.md b/src/material/table/table.md index 12e58e2ec1c6..b8f425c8de3f 100644 --- a/src/material/table/table.md +++ b/src/material/table/table.md @@ -106,21 +106,21 @@ automatically trigger an update to the rows each time a new data array is emitte #### DataSource -For most real-world applications, providing the table a DataSource instance will be the best way to -manage data. The DataSource is meant to serve as a place to encapsulate any sorting, filtering, +For most real-world applications, providing the table a `DataSource` instance will be the best way to +manage data. The `DataSource` is meant to serve as a place to encapsulate any sorting, filtering, pagination, and data retrieval logic specific to the application. -A DataSource is simply a class that has at a minimum the following methods: `connect` and -`disconnect`. The `connect` method will be called by the table to provide an Observable that emits +A `DataSource` is simply a class that has at a minimum the following methods: `connect` and +`disconnect`. The `connect` method will be called by the table to provide an `Observable` that emits the data array that should be rendered. The table will call `disconnect` when the table is destroyed, which may be the right time to clean up any subscriptions that may have been registered in the `connect` method. -Although Angular Material provides a ready-made table DataSource class, `MatTableDataSource`, you may -want to create your own custom DataSource class for more complex use cases. This can be done by -extending the abstract DataSource class with a custom DataSource class that then implements the -`connect` and `disconnect` methods. For use cases where the custom DataSource must also inherit -functionality by extending a different base class, the DataSource base class can be +Although Angular Material provides a ready-made table `DataSource` class, `MatTableDataSource`, you may +want to create your own custom `DataSource` class for more complex use cases. This can be done by +extending the abstract `DataSource` class with a custom `DataSource` class that then implements the +`connect` and `disconnect` methods. For use cases where the custom `DataSource` must also inherit +functionality by extending a different base class, the `DataSource` base class can be implemented instead (`MyCustomDataSource extends SomeOtherBaseClass implements DataSource`) to respect Typescript's restriction to only implement one base class.