muffin-admin 2.1.0 → 2.2.0

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": "muffin-admin",
3
- "version": "2.1.0",
3
+ "version": "2.2.0",
4
4
  "description": "NPM package for https://github.com/klen/muffin-admin",
5
5
  "files": [
6
6
  "src",
package/src/buildRA.tsx CHANGED
@@ -37,7 +37,7 @@ import {
37
37
  import { AvatarField, EditableBooleanField, FKField, JsonField } from "./fields"
38
38
  import { FKInput, JsonInput } from "./inputs"
39
39
 
40
- const UI = {
40
+ export const UI = {
41
41
  // Fields
42
42
  BooleanField,
43
43
  ChipField,
@@ -1,6 +1,13 @@
1
1
  import { AutocompleteInput, ReferenceInput } from "react-admin"
2
2
 
3
3
  export function FKInput({ refKey, refSource, fullWidth, reference, source, ...props }) {
4
+ // Bind to AutoCompleteInput if we want to customize the search
5
+ // const filterToQuery = (search) => {
6
+ // const filters = {}
7
+ // filters[refKey] = search
8
+ // return filters
9
+ // }
10
+
4
11
  refKey = refKey || "id"
5
12
  const renderText = (record) => {
6
13
  const pk = record[refKey]