-
-
Notifications
You must be signed in to change notification settings - Fork 206
Description
I am encountering issues with both Sorting and Filtering functionalities when building RevoGrid with buildEs5: true enabled in stencil.config.ts.
I am using the generated "Smart Loader" (dist/revo-grid/revo-grid.js) via a <script> tag in a non-module environment. While the grid renders and plugins appear to be loaded (icons appear), the data processing logic seems flawed or disconnected from the view update.
I have tested this on the latest version 4.20.2, as well as 4.17.4 and 4.10.24, and the behavior is consistent across all versions when using this build configuration.
Steps to Reproduce:
Clone the repository or setup a RevoGrid project.
Modify stencil.config.ts to include ES5 build support:
export const config: Config = { // ... buildEs5: true, // Enable ES5 build to generate the loader/system.js version // ... };
Run npm run build.
Copy the generated dist/revo-grid folder to a local server.
Import the loader script in an HTML file:
<script src="/path/to/dist/revo-grid/revo-grid.js" type="text/javascript"></script>
Current Behavior:
- Sorting Issue: When sorting a column that contains empty values:
The sorting order is inconsistent.
Empty cells are sometimes sandwiched between populated values instead of being grouped at the top or bottom.
Sometimes empty cells stay at the bottom regardless of Ascending/Descending order.
- Filtering Issue: When applying a filter (e.g., "Set", "Not Set", or specific values):
The UI updates correctly (the funnel icon appears in the column header).
However, the rows in the grid do not change. The data remains unfiltered visually.
No errors are logged in the console.
Expected Behavior:
-
Sorting: Empty values should be grouped together (either at the very top or very bottom) based on standard sorting logic when toggling Ascending/Descending.
-
Filtering: When a filter is applied via the UI, the grid should immediately re-render to show only the matching rows.
Environment:
RevoGrid Version: 4.20.2 (also tested 4.17.4, 4.10.24)
Stencil Config: buildEs5: true
Loading Method: <script> tag (Loader/SystemJS fallback mode)
Possible Cause:
It suspects that in the ES5/SystemJS build output, the internal event propagation for trimming (filtering) or the sorting comparison function for handling nulls is either broken or failed to trigger a view update (requestRender). Since the Filter icon updates, the plugin logic seems to run, but the result is not applied to the grid view.