Comments (7)
@jmzagorski
I found the issue in the Editor because of the use of the find
and indexOf
here to pre-select the default value. If we sort the collection descending, and we have a cell value of 94, the find
will return 2 found items 9
and 4
and since the last found value is 4
, it will select that one.
You can already see this bug on the live Example 3 demo on the "% complete" column because that one has the sorted collection in descending order.
from aurelia-slickgrid.
yup, can't remember why I used indexOf
. I think because the multiSelect
returned an array and I just copied a lot of the logic over to singelSelect
without testing it good enough? I'll have to look at it
from aurelia-slickgrid.
I actually found that problem while doing the new feature of Excel Copy Buffer, which I just merged. This copy buffer uses the serializeValue
function to copy each cell values into it's buffer when the column definition is an editable field (Example 3). So anyway, I believe the MultipleSelectEditor
also has this problem since it also uses the indexOf
.
from aurelia-slickgrid.
I tried it in my Angular repo and made these changes
- if (this.defaultValue.indexOf($e.value) !== -1) {
+ if (this.defaultValue === $e.value) {
That seems to be all good, also note that this.defaultValue
is of type string
because the previous line adds a cast with toString()
.
You can do the change today or I'll make the change sometime tonight.
from aurelia-slickgrid.
That will work for the singleSelectEditor
, but not the multipleSelectEditor
. The multipleSelectEditor.defaultValue
is an array so you need to make that indexOf
check to see if the select value exists in the array. I believe this was a copy and paste error on my part from the multipleSelectEditor
to the singleSelectEditor
.
Side note, i was put on a high priority 1 week project since the end of last week so I have not been able to get to anything I wanted to on slickgrid.
from aurelia-slickgrid.
There was 2 indexOf
in the MultipleSelectEditor
and I changed one of them with the same modification as the SingleSelect
. I think you were possibly thinking about the 1st indexOf
, which I didn't change. Anyhow, I made the same change in both Editors and tested with Example 3 with the collection sorted descending and they both work as expected (I'm actually not sure if it affected the MultipleSelect at all, anyhow I changed it too).
We can re-open if it comes back, but it seems to be ok with the quick tests I made, so I'll close the issue.
from aurelia-slickgrid.
@jmzagorski
I just released last version 1.12.0 before vacations, this fix is included in it :)
A lot of goodies before I leave.
from aurelia-slickgrid.
Related Issues (20)
- Action Required: Fix Renovate Configuration
- Multiple number column filters of the same type affects only the last column HOT 3
- Some translations are not using namespace prefix HOT 4
- aurelia-cli/systemjs excel export fix HOT 6
- Text Filter is lost of focus when "suppressActiveCellChangeOnEdit = false" HOT 6
- No fixed units in scss variables HOT 10
- Slot for custom footer/header HOT 6
- Type-safe column definitions HOT 6
- Error following HOWTO Step by Step guide HOT 3
- formatter HOT 12
- Aurelia-slickgrid breaks other jquery references HOT 2
- Export column width sets on wrong column, when export to excel HOT 12
- 1st (zero) element is not highlited with this.aureliaGrid.gridService.highlightRow(index, delay, delay) HOT 3
- column names are not shown if the slickgrid table is not on the screen HOT 5
- Autosized width overflows parent div in bootstrap 3. HOT 10
- TypeError: Cannot set property dataset of #<HTMLElement> which has only a getter HOT 7
- Customizing GraphQL paging and sorting HOT 3
- Aurelia 2 support HOT 40
- Issues upgrading from v3.12.1 to v4.1.3 HOT 2
- Dependency Dashboard
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 aurelia-slickgrid.