Skip to content

Customize inputElement not working... #64

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

Open
hachi1030-Allen opened this issue Mar 12, 2023 · 2 comments
Open

Customize inputElement not working... #64

hachi1030-Allen opened this issue Mar 12, 2023 · 2 comments

Comments

@hachi1030-Allen
Copy link

Dear author,

I feel this libray quite cool and I have successfully override the addButtonElement, editButtonElement, etc. with Material UI IconButtons.

Looks very nice, but when I try to customize the inputElement, it's not working for me.

My code is like below:

inputElement={(usage, keyPath, deep, keyName, data, dataType) => (
            <TextField />
          )}

I am using React, and I simply replaced the default to this element.

The UI part is modified as below:
image
But when I input values and click on the add button, nothing happened. Even no error in console log.

But if I change back to the default inputElement, the add button works without any issue. So it's not the addButtonElement issue but the inputElement issue.

Can you help to take a look at this and let me know if I am doing anything wrong?

Thanks!

@oxyno-zeta
Copy link
Owner

Hello,

Thanks for creating an issue and sorry for the delay.

Do you have a codepen or a codesandbox that show that problem?
That would help me looking at the problem.

Thanks !

Best regards,

Oxyno-zeta

@vicodevv
Copy link

vicodevv commented Sep 24, 2023

You can try:

            inputElement={(props) => (
            <TextField
              {...props}
              onChange={handleEditorChange}
              style={{ color: '#ff0000', height: '30px' }}
            />
          )}

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

No branches or pull requests

3 participants