Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

edit / show title prop: add 'false' and callback choices #9769

Closed
wants to merge 42 commits into from

Conversation

hiaselhans
Copy link
Contributor

follow-up from #9768 to change branch

This PR adds two more choices to the 'title' prop of edit / show views:

I found this to be the most flexible and efficient way to inject a title

djhi and others added 30 commits July 7, 2022 10:58
## Problem

- Server side validation is cumbersome to set up
- When using middlewares and as the SaveButton relied on the SaveContext.saving prop, the SaveButton was only disabled for while the main mutation was loading. However, additional work may still be running.

## Solution

For `pessismistic` mode only, we now transparently support server side validation. When a server validation occurs, the DataProvider should throw a ServerValidationError that contains an `errors` object matching the form shape.

Besides, we now await the mutation in `useCreateController` and `useEditController`. In `pessimistic` mode, that means the `SaveButton` will stay disabled until the mutation is resolved including its middlewares if any.

That does not change anything for the other mutation modes.
Co-authored-by: Gildas Garcia <1122076+djhi@users.noreply.github.com>
## Problem
There is now easy way to implement cumulative filters (filtering by multiple tags for instance) without reimplementing  `<FilterListItem>`.

### Solution
Introduce two new props:
- isSelected: accept the item value and the current filters and return a boolean
- toggleFilter: accept the item value and the current filters and return new filters
Co-authored-by: Jean-Baptiste Kaiser <jb@marmelab.com>
Co-authored-by: Gildas Garcia <1122076+djhi@users.noreply.github.com>
…-customization

Allow to customize how `<FilterListItem>` applies filters
Co-authored-by: Jean-Baptiste Kaiser <jb@marmelab.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants