Skip to content

Commit

Permalink
[language-filter] Fix incorrect function name in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
bjoerge committed Oct 16, 2018
1 parent 2ac5f11 commit c9beafa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/@sanity/language-filter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ export default {
{id: 'pt', title: 'Portuguese'}
//...
],
filterFn: (enclosingType, field, selectedLanguageIds) =>
filterField: (enclosingType, field, selectedLanguageIds) =>
!enclosingType.name.startsWith('locale') || selectedLanguageIds.includes(field.name)
}
```

- `supportedLanguages` is an array of languages with `id` and `title`. If your localized fields are defined using our recommended way described here (https://www.sanity.io/docs/localization), you probably want to share this list of supported languages between this config and your schema.
- `filterFn` is a function that must return true if the field should be displayed. It is passed the enclosing type (e.g the object type containing the localized fields, the field, and an array of the currently selected language ids.
- `filterField` is a function that must return true if the field should be displayed. It is passed the enclosing type (e.g the object type containing the localized fields, the field, and an array of the currently selected language ids.

0 comments on commit c9beafa

Please sign in to comment.