nadbm/react-datasheet

Cell width quirks

Open

#149 创建于 2019年4月4日

在 GitHub 查看
 (2 评论) (0 反应) (0 负责人)JavaScript (5,323 star) (513 fork)batch import
help wanted

描述

There's easy ways to control column width uniformly but it'd be nice to have a feature on the Cell for it to preserve its width when in edit mode. Because of browser quirks with how inputs are treated vs spans (which can easily size to their content width) even setting the input to 100% doesn't quite get your cell to look the same in edit mode and in input mode.

Again, to be clear, I'd like to be able to easily avoid the width juking between going into edit mode and input mode, like when you have no-wrap mode on.

My idea would be to have the Cell check it's width just before going into edit mode and set it manually, via style, and then remove it when out of edit mode. That would let the input, which is 100%, size appropriately. (or some other solution).

nbd if it's too small potatoes, we can do our own cell renderer afterall, but it would be a nice to have.

贡献者指南