react-datasheet icon indicating copy to clipboard operation
react-datasheet copied to clipboard

style seem to be something wrong

Open Angeliz opened this issue 6 years ago • 6 comments

it works like that image I try to change some styles...it works image image

Angeliz avatar Jul 16 '18 06:07 Angeliz

Yes... It should be fixed. I waste so much time. And also, I can see cell height when editing is incorrect also.

bexoss avatar Sep 18 '18 03:09 bexoss

.data-grid-container .data-grid .cell>input {
    outline: none !important;
    border: 2px solid rgb(33, 133, 208);
    text-align: right;
    width: calc(100% - 1px);
    height: 'auto';
    background: none;
    display: block;
}

I changed some...

bexoss avatar Sep 18 '18 03:09 bexoss

This seems to be happening because in one instance it counts the padding and border as extra to the height and in another instance it includes it in the height. See the pictures below for what I mean.

Padding and Border Included: capture capture3

Padding and Border not included capture2 capture4

Solution: I looked it up and it's happening because box-sizing for the input element is set to 'border-box' instead of 'content-box'. Setting it to 'content-box' solves the problem. Maybe this should be added onto the input elements in this library? Also, any change in line height messes the sizing up too.

ZackKnopp avatar Oct 17 '18 17:10 ZackKnopp

@ZackKnopp Can't thank you enough..... I was literally breaking my head trying to figure out how to solve this.

annjawn avatar Jun 06 '19 22:06 annjawn

Can you, please, fix this issue asap, @nadbm? Thank you.

power-f-GOD avatar Dec 13 '19 11:12 power-f-GOD

when use with semantic ui, the css totally mess.

imhazige avatar May 23 '20 06:05 imhazige