Comcast / Comcast/react-data-grid

[Feature request] Fillable but not editable columns

Open
#3,116 2 comments 0 reactions 0 assignees View on GitHub
Will Accept PR
Dominant language
TypeScript
Stars
7.7k
Forks
2.2k
Avg merge
1d 2h
Merged PRs (30d)
33

Description

My use case is a dropdown column where the user can immediately click on a column to select an option while also seeing drag to fill control, I am achieving this by using `onRowChange` of the`formatter` component.

image

But according to this line, https://github.com/adazzle/react-data-grid/blob/main/src/DragHandle.tsx#L92-L98 the drag-to-fill control do nothing if the editor is not specified (another question why render it at all if it is doing nothing)?

So I need to do something like this to make it work, while it still hides the fill control on double click into the field:

```tsx
editor: function DropdownColumnFormatter({ row, onClose, onRowChange }) {
return (
{
console.log(row)
onRowChange(row, true);
onClose()
}}
/>
);
},
editorOptions: {
renderFormatter: true,
},
formatter: function DropdownColumnFormatter({ row, onRowChange }) {
return (

);
},
```

I would expect to not specify these props at all or just `editable: true` and still having an ability to change the row by filling without rendering editor

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.