cscan / vue-excel-editor

Vue2 plugin for displaying and editing the array-of-object in Excel style
MIT License
557 stars 108 forks source link

Can we use placeholders in each shell? #139

Closed JuKyYoon closed 5 months ago

JuKyYoon commented 6 months ago

image

I used this editor for data entry purposes. So i'm making good use of features like validation.

To use validation, I think I need a feature that informs us of what values need to be entered. Therefore, I checked to see if i could set placeholders in each shell, but unfortunately, I couldn't find such a feature. Is there a similar feature to placeholders, or if i need to implement placeholders ourselves, how should i create it?"

cscan commented 6 months ago

There is no exact placeholder feature take place in cell level. But you may try using :validation to return the hint after user typed

JuKyYoon commented 5 months ago

I found a solution to add a placeholder using CSS.

.vue-excel-editor tr td:nth-child(3):empty::before {
  content: 'placeholder';
  color: #d8d8d8;
}

The number 3 is column number.