Replies: 2 comments
-
It does take a while indeed, as This is the main drawback of having a React component (or any kind of function, for that matter) with so many configuration options that are properly validated and documented with TS. The same happens, for instance, if you're using things like tRPC, which are heavily based on dynamic types... For instance, have a look at how the sorting-related prop types are defined: https://github.com/icflorescu/mantine-datatable/blob/main/package/types/DataTableSortProps.ts accessor: keyof T | (string & NonNullable<unknown>); This way, the editor will be able to suggest properties inferred from the type of It doesn't take 4s, though. On my machine, a not-so-new Ryzen7 4800u laptop with Manjaro Linux, the scenario you are describing takes about one second for the autocomplete to trigger. I may be subjective, but all-in-all, I'd say it's an acceptable trade-off. |
Beta Was this translation helpful? Give feedback.
-
Going to convert this to a discussion. |
Beta Was this translation helpful? Give feedback.
-
Reproduce:
<DataTable columns={[{ accessor: "title" }]} records={data} />;
lo
<DataTable columns={[{ accessor: "title" }]} records={data} lo />;
In other components for me all good, only with this it takes so long time :)
Beta Was this translation helpful? Give feedback.
All reactions