@applica-software-guru/react-admin 1.4.187 → 1.4.189

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applica-software-guru/react-admin",
3
- "version": "1.4.187",
3
+ "version": "1.4.189",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -2,7 +2,13 @@ import { useRecordContext, useResourceContext, useTranslate } from 'react-admin'
2
2
 
3
3
  import { useMemo } from 'react';
4
4
 
5
- const useResourceTitle = (title) => {
5
+ /**
6
+ * Generate the title of a resource page from its name and the current record.
7
+ *
8
+ * @param title Can be the resource name, a fully qualified translation key, or a boolean to disable the title
9
+ * @returns The title of the resource, based on the current record and the resource name
10
+ */
11
+ export function useResourceTitle(title: string | boolean | undefined): string | boolean | undefined {
6
12
  const record = useRecordContext();
7
13
  const translate = useTranslate();
8
14
  const resource = useResourceContext();
@@ -23,6 +29,6 @@ const useResourceTitle = (title) => {
23
29
  }, [mode, record, resource, translate, title]);
24
30
 
25
31
  return cardTitle;
26
- };
32
+ }
27
33
 
28
34
  export default useResourceTitle;
package/src/index.jsx CHANGED
@@ -25,6 +25,7 @@ export {
25
25
  EditContextProvider,
26
26
  email,
27
27
  FieldTitle,
28
+ FilterButton,
28
29
  Form,
29
30
  FormDataConsumer,
30
31
  HttpError,