Project

General

Profile

Actions

Defect #713

closed

To many identities in selectbox

Added by Ondřej Kopr over 6 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Ondřej Kopr
Category:
Frontend
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Affected versions:
Owner:

Description

I found problem with component selectbox. I have about 160.000 identities and every identity has same email "" when type into selectbox "kopr" i get none result (see pictures). It is possible fix this problem? Also please add localization.


Files

vs_selectbox.png (18.2 KB) vs_selectbox.png Ondřej Kopr, 09/21/2017 08:22 AM
identity_select.png (13.8 KB) identity_select.png Ondřej Kopr, 09/21/2017 08:22 AM

Related issues

Follows IdStory Identity Manager - Task #723: Create IdentitySelect and RoleSelect componentClosedOndřej Kopr09/27/2017

Actions
Actions #1

Updated by Ondřej Kopr over 6 years ago

  • Status changed from New to In Progress
Actions #2

Updated by Ondřej Kopr over 6 years ago

In this ticket i also updated behavior saving script authority, now is filled only correct attribute (service / className)
commit: https://github.com/bcvsolutions/CzechIdMng/commit/c226a0e2aef6dfac5c0c8abd3ef7c52d84c1416d

Actions #3

Updated by Ondřej Kopr over 6 years ago

Finnaly i found possible problem component react-select box filtering data by method :

filterOptions (excludeOptions) {
        var filterValue = this.state.inputValue;
        var options = this.props.options || [];
        if (this.props.filterOptions) {
            // Maintain backwards compatibility with boolean attribute
            const filterOptions = typeof this.props.filterOptions === 'function'
                ? this.props.filterOptions
                : defaultFilterOptions;

            return filterOptions(
                options,
                filterValue,
                excludeOptions,
                {
                    filterOption: this.props.filterOption,
                    ignoreAccents: this.props.ignoreAccents,
                    ignoreCase: this.props.ignoreCase,
                    labelKey: this.props.labelKey,
                    matchPos: this.props.matchPos,
                    matchProp: this.props.matchProp,
                    valueKey: this.props.valueKey,
                }
            );
        } else {
            return options;
        }
    },

This method filters data by valueKey, lableKey and etc. but we filter data on BE. I just explict turn off this feature by props: filterOptions. Also upgrade react-select

https://www.npmjs.com/package/react-select
https://github.com/JedWatson/react-select/issues/1714

commit: https://github.com/bcvsolutions/CzechIdMng/commit/48f1519e79fbe2af6e73ffcb22e07245517f6921

please Radek could you make a review? Thanks :]

Actions #4

Updated by Ondřej Kopr over 6 years ago

  • Status changed from In Progress to Needs feedback
  • Assignee changed from Ondřej Kopr to Radek Tomiška
  • % Done changed from 0 to 90
Actions #5

Updated by Radek Tomiška over 6 years ago

  • Due date set to 09/28/2017
  • Start date changed from 09/21/2017 to 09/28/2017
  • Follows Task #723: Create IdentitySelect and RoleSelect component added
Actions #6

Updated by Radek Tomiška over 6 years ago

  • Due date deleted (09/28/2017)
  • Status changed from Needs feedback to Closed
  • Assignee changed from Radek Tomiška to Ondřej Kopr
  • Target version set to Diamond (7.4.0)
  • Start date deleted (09/28/2017)
  • % Done changed from 90 to 100

I did review, this workaround solves this issue, thx.

I've added new ticket #723, when 'searchInFields' will be configured correctly and prop 'filterOptions' can be set to true again. 'searchInFields' prop is better, because it shows, where was filled value found e.g. identity's nice label is 'Ondra' but this identiti was foun by 'xxx' in their description.

Actions #7

Updated by Radek Tomiška about 5 years ago

  • Category changed from 20 to Frontend
Actions

Also available in: Atom PDF