You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Type '{ hasShow: boolean; hasEdit: boolean; resource: string; }' is not assignable to type 'IntrinsicAttributes & ListGuesserProps'.
Property 'hasShow' does not exist on type 'IntrinsicAttributes & ListGuesserProps'.
It seems that ListGuesserProps is missing props definitions from UseResourceDefinitionOptions that is used internally.
Using hasShow and hasEdit will hide the Show and Edit buttons, but the related pages (and routes) will still be there. This means that if a user types the /users/1 URL, they will actually see a working Edition page.
If you want to restrict the number of routes for a resource, the solution is to remove the edit and show pages in your <Resource>, or to switch from <ListGuesser> to <List>.
We don't want to allow a feature that leads to a broken admin, so we won't be merging your PR.
We don't want to allow a feature that leads to a broken admin, so we won't be merging your PR.
@fzaninotto thanks for PR, I understand the point of view you described.
IMHO it would not lead to a broken admin unless introspection do the job on setting right initial values related to existence of api operations. Further manual settings depends on UI designer. Edit/ Show button in my perception is just a one way of the list appearance. How list item is linked to its operations. Built-in defaults values for hasShow and hasEdit based on existence of related api operation is what we expect from introspections, but a the end UI designer may wants other list appearance, for example without buttons, opening item show page/ operation by row click (and this was the case behind this PR).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It works as expected but gives typescript error
It seems that ListGuesserProps is missing props definitions from UseResourceDefinitionOptions that is used internally.