molgenis / molgenis-frontend

Frontend code for MOLGENIS
GNU Lesser General Public License v3.0
6 stars 12 forks source link

Select options query fails in case of non string attribute #197

Open connoratrug opened 5 years ago

connoratrug commented 5 years ago

How to Reproduce

Expected behavior

Sever returns filtered reference items ( {1, 'red'} in the example)

Observed behavior

Request to server fails and a js error is generated

(note: the default options query generated by the molgenis-ui-forms.MappingService incorrectly assumes columns used in options query are of type string / OR api incorrectly tries to query non string column as string column)

fdlk commented 5 years ago

Am typing it into the Vue Forms Specification document to make sure it's persisted, but so far I have:

Lookup attributes

The lookup attributes of an entity are returned by the metadata in the REST api. They are all attributes of the entity itself (including inherited attributes), for which lookupAttribute = true. If an entity type has no lookup attributes, its label attribute is the lookup attribute. See the “Filters - lookup attributes” test cases in the data explorer test plan.

fdlk commented 5 years ago

See also existing implementations in jquery and react