nadbm/react-datasheet

Cell width quirks

Open

#149 aberto em 4 de abr. de 2019

Ver no GitHub
 (2 comments) (0 reactions) (0 assignees)JavaScript (513 forks)batch import
help wanted

Métricas do repositório

Stars
 (5.323 stars)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

Description

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.

Guia do colaborador