Comments (4)
Can you tell me a bit more about your use case?
When we go to the documentation for the setSortConfig
method we can see that
Warn: Useful mainly for providing server side sort implementation (see in the example below). It doesn't sort the data set. It just sets sort configuration for all sorted columns. Note: Please keep in mind that this method doesn't re-render the table.
and this is how it works at the moment.
Reference: https://handsontable.com/docs/react-data-grid/api/multi-column-sorting/#setsortconfig
from handsontable.
Hi @AMBudnik
Haven't you noticed? The sort setting is successful, the title column is not sorted, the icon shows that setSortConfig is successful, you need to see the effect, but also adjust the size of the following appears, no display of the sorted rule.
from handsontable.
Ah yes, you are right - the arrow should appear without the need to resize the column.
Based on the documentation that I linked at https://handsontable.com/docs/react-data-grid/api/multi-column-sorting/#setsortconfig
beforeColumnSort: function(currentSortConfig, destinationSortConfigs) {
const columnSortPlugin = this.getPlugin('multiColumnSorting');
columnSortPlugin.setSortConfig(destinationSortConfigs);
// const newData = ... // Calculated data set, ie. from an AJAX call.
this.loadData(newData); // Load new data set and re-render the table.
return false; // The blockade for the default sort action.
}
we call loadData()
. However, that forces the plugin to reset so the arrows are not visible. (I will request that this example be altered.)
Now the table has to rerender to show an arrow. But we do not want the plugin to reset (it has to hold the sorting config) so instead of loadData()
we need to call updateData()
.
Here is the demo for you to test https://jsfiddle.net/sj28q9cr/
Please let me know if it works for you.
from handsontable.
Issue closed due to inactivity.
from handsontable.
Related Issues (20)
- [Bug]: "mergedHotSettings" Error reporting! HOT 5
- [Bug]: getCellsMeta return stale result if row and column have been inserted HOT 3
- Handsontable 14.2.0 is here!
- [Bug]: vue2, handsontable, use multi-column sort plug-in, start multi-column sort, beforeColumnSort execution time is what? HOT 1
- [Bug]: The 'core.spliceRow' method threw an exception HOT 3
- [Bug]: renderer function execution time? HOT 2
- [Bug]: In the demo code for Instance methods, hotInstance is not available when using typescript. HOT 2
- [Bug]: rowHeaders insert row above bug HOT 3
- [Bug]: React / Nested Rows / Nested row collapse status resets when props are passed from parent to child HOT 1
- [Bug]: When a specific row height is set and "wordWrap" is enabled, the row height can still change dynamically based on the content. HOT 2
- [Bug]: Missing cell borders HOT 1
- [Bug]: Installed 14.2 but having performance and display issue not seen with 13.0, also had to convert to ES5 HOT 16
- [Bug]: vue2 insert column disable? HOT 5
- How can i get the older version document, such as v6,v7? HOT 4
- [Bug]: Multiple sorting resets on the fifth click HOT 2
- [Bug]: custom rendorer called multiple times and did dom manipulation creating a slow performance and row misalignment HOT 1
- [Bug]: cell editor doesn't switch as intended on tab navigation between cells HOT 1
- [Bug]: Table crashes when entering a number value with a space between negative symbol and numbers HOT 1
- [Bug]: Vue 3 composition API ref error HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from handsontable.