Unplanned
Last Updated: 05 Apr 2024 21:20 by Amit
Patrick
Created on: 31 Jul 2023 15:57
Category: KendoReact
Type: Feature Request
12
KendoReact Spreadsheet Column Filters

The KendoReact Spreadsheet component has been released.

There are a few features that are missing compared to the jQuery version, and filtering rows based on column filters is one of them. 

Until this feature is added (along with context menus), we won't be able to use the Spreadsheet component for what we need to build, so we will have to continue wrapping the jQuery component. The object provided by the spreadsheet ref can filter programatically based on the (undocumented in KendoReact's docs) `range.filter()` method, but this would take a lot of time to implement what the jQuery version already has.

8 comments
Amit
Posted on: 05 Apr 2024 21:20

Hi Patrick - i got it all working. Thanks for your note and suggestion on this. I found the below helpful:

React - Kendo UI Third-Party Tools - Kendo UI for jQuery (telerik.com)

Thanks for everything.

Regards,

-Amit


Patrick
Posted on: 05 Apr 2024 16:30

Amit, it sounds like Kendo library isn't being loaded. We're using Vite, and we have `@progress/kendo-ui` as a dependency for the project. Here's what I used to absolutely make sure jQuery and Kendo UI were in scope.

```

// spreadsheet-wrapper.jsx

import KendoUI from '@progress/kendo-ui';

window.kendo = KendoUI;
const $ = window.kendo.jQuery;
window.$ = $;

```

Because we assign several things to `window`, you should be able to go into the javascript console and test that everything is loaded correctly.

Amit
Posted on: 05 Apr 2024 15:50
Hi Patrick - finally getting around to this. When i tried the below i get an error: ".kendoSpreadsheet is not a function". I have included <script src="kendo.all.min.js"></script> in my application so it should find it. It feels like i am missing something obvious? Thoughts?
Patrick
Posted on: 01 Mar 2024 20:38

Amit,

It depends on how much integration you require. We are using a state library that helps us in some cases sync changes in the spreadsheet with our react code. (We use `@preact/signals-react`, but anything that lets you set state outside of components should work.)

We just render `<div ref={spreadsheetRef} />` and in a `useEffect(...)` call `$(spreadsheetRef.current).kendoSpreadsheet({ ... })`. You can then pass optoins and bind events as you would the jQuery spreadsheet.

Amit
Posted on: 01 Mar 2024 19:42
Patrick - Thanks for the response. Do you happen to have a simple example handy of how to wrap the Kendo UI widget within React?
Patrick
Posted on: 26 Feb 2024 22:38

Amit: currently we are wrapping the Kendo UI spreadsheet so that we can manipulate the filters. It is not terribly ergonomic, especially since the only event that triggers for filter changes is "render".

Amit
Posted on: 26 Feb 2024 13:50
This is a spreadsheet widget. Filters are a very important and useful tool of *any* spreadsheet and its a little concerning that this is not yet implemented for React. What is workaround here? 
ADMIN
Filip
Posted on: 01 Aug 2023 10:32

Hello, Patrick,

Thank you for the submitted feature request. 

We will be monitoring it closely.

Regards,
Filip
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Kendo family, check out our getting started resources!