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

Fix strictNullCheck errors in examples #9833

Merged
merged 12 commits into from May 13, 2024
Merged

Conversation

djhi
Copy link
Contributor

@djhi djhi commented May 6, 2024

No description provided.

@djhi djhi changed the title Fix strictNullCheck errors in simple example Fix strictNullCheck errors in examples May 6, 2024
examples/simple/src/authProvider.tsx Show resolved Hide resolved
@@ -113,7 +113,7 @@ const PostCreate = () => {
<FileInput
source="pdffile"
label="PDF-Template"
accept="application/pdf"
accept={{ 'application/pdf': ['.pdf'] }}
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't we update the doc, too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated

examples/simple/src/users/UserEdit.tsx Show resolved Hide resolved
@fzaninotto
Copy link
Member

I think we should add the typescheck of the simple example to the typecheck CI step

@djhi
Copy link
Contributor Author

djhi commented May 6, 2024

I think we should add the typescheck of the simple example to the typecheck CI step

Added

@@ -72,7 +72,7 @@ Files are accepted or rejected based on the `accept`, `multiple`, `minSize` and
Equivalent of [the `accept` attribute of an `<input type="file">`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept). `accept` must be a valid [MIME type](https://www.iana.org/assignments/media-types/media-types.xhtml), according to [input element specification](https://www.w3.org/wiki/HTML/Elements/input/file) or a valid file extension.

```jsx
<FileInput source="attachments" accept="application/pdf">
<FileInput source="attachments" accept={{ 'application/pdf': ['.pdf'] }}>
Copy link
Member

Choose a reason for hiding this comment

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

Can you also add a mention about this change in the Upgrade guide?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added

with:
install-command: yarn --immutable
- name: Build
run: make build
Copy link
Member

Choose a reason for hiding this comment

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

Why do you need to build here? It shouldn't be necessary

@@ -67,6 +67,27 @@ jobs:
env:
CI: true

simple-example:
Copy link
Member

Choose a reason for hiding this comment

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

Can't you just add a step in the typecheck workflow?

@djhi djhi force-pushed the simple-example-strictNullCheck branch from f921c56 to b0e1b62 Compare May 13, 2024 07:52
@fzaninotto fzaninotto merged commit 9419ce5 into next May 13, 2024
13 checks passed
@fzaninotto fzaninotto deleted the simple-example-strictNullCheck branch May 13, 2024 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFR Ready For Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants