Skip to content

Replace deprecated InputProps#748

Merged
killergerbah merged 1 commit intokillergerbah:mainfrom
artjomsR:replace_InputProps
Jul 29, 2025
Merged

Replace deprecated InputProps#748
killergerbah merged 1 commit intokillergerbah:mainfrom
artjomsR:replace_InputProps

Conversation

@artjomsR
Copy link
Copy Markdown
Contributor

I've noticed the deprecation warnings while working on the previous PR, so figured I'd make a separate one for this. Bar 1 exception, the replacements are:

  • InputProps -> slotProps.input
  • inputProps -> slotProps.htmlInput

I've given it a quick test, and it seemed fine, feel free to do a more thorough check. And feel free to use this PR partially if you feel that'll be more useful :)

@artjomsR artjomsR force-pushed the replace_InputProps branch 2 times, most recently from 7b97af4 to 0320ee7 Compare July 26, 2025 11:09
{(removable || onOrderChange) && (
slotProps={{
htmlInput: {
endAdornment: (
Copy link
Copy Markdown
Owner

@killergerbah killergerbah Jul 26, 2025

Choose a reason for hiding this comment

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

On my computer the TextField endAdornments only show up if they're inside input: {...}
Might be because I just updated MUI. Can you test after pulling from main?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ah yep I see what you mean, I've missed that ms dissappeared for some fields facepalm 🤦 I can replace all the affected htmlInput with input to fix endAdornments, if that works for you?

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

For me it's not just ms but for example all the adornments that should be in the Anki settings:

image

This is what it should look like:
image

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

But yeah, if switching to input fixes that then please do 🙏

@artjomsR artjomsR force-pushed the replace_InputProps branch from 0320ee7 to 2e16880 Compare July 27, 2025 11:10
@artjomsR
Copy link
Copy Markdown
Contributor Author

Ok, I gave it another shot, I didn't create a new commit and amended it instead, since I changed the existing code a bit. All the items on the right-hand side (ms, refresh icons) were present for me on the settings and Anki export dialogue

The general approach seems to be something like

                                slotProps={{
                                    htmlInput: {
                                        min: 0,
                                        step: 1,
                                        ...,
                                    },
                                    input: {
                                        endAdornment: ...,
                                        ...,
                                    },
                                }}

@artjomsR artjomsR requested a review from killergerbah July 27, 2025 11:15
@killergerbah
Copy link
Copy Markdown
Owner

Awesome man, thanks as always

@killergerbah killergerbah added this to the Extension v1.12.0 milestone Jul 29, 2025
@killergerbah killergerbah merged commit 8e5e9eb into killergerbah:main Jul 29, 2025
1 check passed
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.

2 participants