GridSearch widget for Mendix 9

0
I am evaluating migrating to Mendix 9 but the DataGrid 2 is not mature enough to replace our current combination of list views with some additional features from the list view controls widget and the gridsearch widgets.   It seems however the gridsearch widget is broken in Mendix 9, more specifically the dynamic drop downs are broken. The options in the drop down are not loaded anymore. I did some digging and it turns out a change was on in the Mendix javascript causing this issue.   In Mendix 8 the ‘_initdatasource’ of the mxui.widget.SearchInput widget looks like this:   _initDataSource: function() { this.datasource && "xpath" === this.datasource.type && (this._datasource = new h(j.mixin({}, { entity: this.entity, attributes: [this._attribute], context: this.mxcontext, distinct: !0, wantCount: !1, friendlyId: this.friendlyId }, this.datasource.params))) },   In Mendix 9 however it looks like this:   _initDataSource: function() { this.datasource && "database" === this.datasource.type && (this._datasource = new d(C.mixin({}, { entity: this.entity, attributes: [this._attribute], context: this.mxcontext, distinct: !0, wantCount: !1, friendlyId: this.friendlyId }, this.datasource.params))) },   Because our data source type = xpath the this._datasource is not filled anymore and this seems to be causing the issue that the options of the dynamic drop down are no longer filled. Does anyone have any idea how this can be solved?
asked
3 answers
2

Hi Bart,

Looks like we could change the datasource type in the GridSearch widget code:

https://github.com/tieniber/GridSearch/blob/master/src/GridSearch/widget/GridSearchMX.js#L114

and

https://github.com/tieniber/GridSearch/blob/master/src/GridSearch/widget/GridSearchMX.js#L118

I think it will need to be conditional based on Mendix version to maintain Mx8 compatibility.

answered
0

Hi Eric,

The new version you shared on Slack seems to work just fine in Mendix 9. Not sure how you can check the Mendix version from the widget code though.

answered
0

For anyone else that runs into this issue, the file of Eric is this:

 

https://mendixcommunity.slack.com/files/URRPETN6R/F02D3BDBY9H/gridsearch.mpk

 

And indeed, the fix works. Would be great if the app store was also update since more people will switch to Mendix 9 and run into this.

answered