Skip to content

[client] Use the appropriate text message when no matching option is found for...

Antoine requested to merge ZeHiro/kresus:custom-field-no-option into master

[client] Use the appropriate text message when no matching option is found for a select custom field.

This MR fixes a problem introduced 1 year ago (here: 4dc25af0) when migrating from v1 to v2 of react-select (more precisely, the migration was forgotten). STR:

  • in the bank creation form, select a bank for which a select custom field is necessary
  • in the custom field's fuzzy select, type anything that will match none of the possible options
  • the fuzzy select displays No options, instead of the appropriate translation (No website found for example).

I also deleted dead translation keys. The final commit fixes an error which appears in the console, when an optional field, of type select, does not have a default value (see "bnp paribas" module). Here is the error observed when an optional select field has no default value:

Warning: Failed prop type: The prop `value` is marked as required in `ConnectFunction`, but its value is `undefined`.
    in ConnectFunction (created by CustomBankField)
    in CustomBankField (created by NewAccessForm)
    in form (created by NewAccessForm)
    in NewAccessForm (created by ConnectFunction)
    in ConnectFunction
    in div
    in div
    in Unknown
    in Route
    in Switch
    in Unknown (created by BaseApp)
    in Route (created by BaseApp)
    in Switch (created by BaseApp)
    in div (created by BaseApp)
    in main (created by BaseApp)
    in BaseApp (created by ConnectFunction)
    in ConnectFunction
    in Unknown (created by ConnectFunction)
    in ConnectFunction
    in Route
    in Switch
    in ErrorReporter
    in Unknown (created by ConnectFunction)
    in ConnectFunction
    in Provider
    in Router (created by BrowserRouter)
    in BrowserRouter
Edited by Benjamin Bouvier

Merge request reports

Loading