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

remove unsupported propTypes #8758

Closed
wants to merge 41 commits into from
Closed

Conversation

hiaselhans
Copy link
Contributor

these props weren't included in the interface and setting them resulted in a:

Warning: React does not recognize the `hasShow` prop on a DOM element.

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.
## 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 <[email protected]>
…-customization

Allow to customize how `<FilterListItem>` applies filters
Co-authored-by: Jean-Baptiste Kaiser <[email protected]>
Copy link
Contributor

@slax57 slax57 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes you are correct, thanks for the PR!

However:

  • since we have released RA v4.9.0, would you mind rebasing your branch on top of the latest version of the next branch please?
  • Could you also remove hasShow, hasEdit and hasList from examples/simple/src/tags/TagEdit.tsx please?

Thanks

@fzaninotto fzaninotto changed the base branch from next to master April 11, 2023 15:21
@fzaninotto fzaninotto changed the base branch from master to next April 11, 2023 15:22
@fzaninotto
Copy link
Member

Gentle reminder, would you mind rebasing your PR?

@djhi djhi deleted the branch marmelab:next May 25, 2023 08:19
@djhi djhi closed this May 25, 2023
@djhi djhi reopened this May 25, 2023
@slax57
Copy link
Contributor

slax57 commented Jul 17, 2023

Superseded by #9101

@slax57 slax57 closed this Jul 17, 2023
@hiaselhans
Copy link
Contributor Author

thanks!
@WiXSL

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.

5 participants