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

v7.0.0-alpha-10 - selectableRowsComponent ts issue and content overflow issue #808

Closed
izaacdb opened this issue May 19, 2021 · 3 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@izaacdb
Copy link

izaacdb commented May 19, 2021

I'm trying out your alpha 10 (thanks for updating everything, it is working much better for me in terms of TS errors) and found a few problems so far.

selectableRowsComponent ts issue

With import {Checkbox} from '@material-ui/core

If I put selectableRowsComponent={Checkbox} there is a TS error:

TS2322: Type '(props: CheckboxProps) => Element' is not assignable to type '"input" | ReactElement<any, string | ((props: any) => ReactElement<any, string | ... | (new (props: any) => Component<any, any, any>)> | null) | (new (props: any) => Component<any, any, any>)> | undefined'.
Type '(props: CheckboxProps) => Element' is missing the following properties from type 'ReactElement<any, string | ((props: any) => ReactElement<any, string | ... | (new (props: any) => Component<any, any, any>)> | null) | (new (props: any) => Component<any, any, any>)>': type, props, key

If I put selectableRowsComponent={<Checkbox />}
There is a runtime error:

Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.

content overflow

I have a 100vh container using display:flex and flex-direction:column. This leads to un-scrollable content with 20+ rows. I think this is because of the div being set to display:table which stops the max-height:100% from working.

I use this to fix it:

.rdt_TableHeader+div>div{
    display: block;
    height: 100%;
}
@jbetancur jbetancur self-assigned this May 19, 2021
@jbetancur
Copy link
Owner

There is def something wrong with the typing. I'll investigate. As for the content overflow a working example on codesandbox would be helpful

@jbetancur jbetancur added the bug Something isn't working label May 19, 2021
@jbetancur
Copy link
Owner

#809 is merged with fixes and will roll out in alpha 11

@jbetancur
Copy link
Owner

jbetancur commented May 19, 2021

Going to close this for now as fixing #809, but for the content overflow please open a separate issue with a working example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants