DataView filters: match rows where the field is an array
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 84/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- react, typescript
- Área
- frontend
Línea de trabajo
Busca en el código String(row.getValue(columnId)) para localizar las operaciones de filtro de DataView para select/multiselect (in, notin, eq, neq). Lee cómo convierten esos operadores los valores actualmente y luego añade una rama Array.isArray(cellValue) que implemente cualquier coincidencia para in/eq y ninguna coincidencia para notin/neq, dejando intacto el comportamiento escalar. Añade pruebas que cubran celdas de arreglo además de los casos existentes de cadena/número; se considera terminado cuando tanto las pruebas antiguas como las nuevas pasan y groupable queda fuera de ámbito.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Right now a select/multiselect filter only works when each row has one value in that column. A lot of real data has several: tags on a ticket, labels on an issue, all the projects someone is on.
What happens today
Say a row has labels: ['bug', 'urgent'] and you filter labels with "is any of: urgent". The in check does String(row.getValue(columnId)), which turns the array into "bug,urgent". It never matches. eq has the same problem.
There's also no way to pass a custom filterFn for a field, so you can't work around it from the outside.
What I'd expect
When the cell value is an array:
in(is any of): match if any item in the row is in the selected setnotin(is none of): match if no item in the row is in the selected seteq/neqforselect: same idea with one value
Strings and numbers keep working exactly like they do now, so nothing changes for existing tables.
Grouping by an array field is a separate question (one row in several groups?). I'd leave that out of this, and maybe just not allow groupable on array fields for now.
Possible shape
Probably just checking Array.isArray(cellValue) inside the select and multiselect operations. Or an explicit flag like field.multiValue: true, if you'd rather be strict about it.
- Lenguaje dominante
- TypeScript
- Estrellas
- 69
- Forks
- 13
- Merge medio
- 3 d 15 h
- PR fusionados (30 d)
- 24
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de raystack/apsara
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 2 días
-
DataView: don't offer select/multiselect filters with empty filterOptionsPosiblemente ocupada @rohanchkrabrty la tomó hace 5 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 2 días
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
Los mantenedores suelen responder en 2 días
Todos los issues de raystack/apsara
Issues similares
-
[Bug] The clients language filter cannot select the rows the page labels as unknownPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
apache/rocketmq-dashboard#6103 ·
Los mantenedores suelen responder en 4 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
cockpit-project/cockpit-machines#2835 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
cloudflare/kumo#866 ·
Los mantenedores suelen responder en 1 día
-
area:connector bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
autoInject recall silently drops memory injection on long / non-Latin prompts (HTTP 400 Query too long)Posiblemente ocupada @Epsilon006 la tomó hoy. Abiertointegration:coding-agents
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
vectorize-io/hindsight#5476 · 1 comentario ·
Los mantenedores suelen responder en 1 día