palantir/blueprint

EditableText: support additional editing customisation [feature request]

Open

#1.393 aberto em 27 de jul. de 2017

Ver no GitHub
 (3 comments) (0 reactions) (0 assignees)TypeScript (2.167 forks)batch import
Package: coreType: enhancementhelp wanted

Métricas do repositório

Stars
 (20.263 stars)
Métricas de merge de PR
 (Mesclagem média 43d 10h) (27 fundiu PRs em 30d)

Description

It would be convenient to have more control around the edit process.

My motivating example is to differentiate display-value vs edit-value; for example display a formatted currency string "$1,234.50", but present the raw number (1234.5) for editing.

I can think of a few possibilities off the top of my head to implement this:

  • an optional format function
  • different properties for display and editing values
  • a callback fired before editing starts
  • (more involved) a different component for editing, meaning you could also use a select list on edit, or a colour picker, etc

I'm not sure which might be the best solution, if this is desirable functionality, but I'm happy to work on a patch for feedback if necessary.

Guia do colaborador