(api: SchemaApi, payload?: object)
| 651 | } |
| 652 | |
| 653 | handleApi(api: SchemaApi, payload?: object) { |
| 654 | const {data, env} = this.props; |
| 655 | if (api) { |
| 656 | const ctx = createObject(data, { |
| 657 | ...payload |
| 658 | }); |
| 659 | |
| 660 | const apiObject = normalizeApi(api); |
| 661 | |
| 662 | if (apiObject.method?.toLowerCase() === 'get' && !apiObject.data) { |
| 663 | window.open(buildApi(apiObject, ctx).url); |
| 664 | } else { |
| 665 | apiObject.responseType = apiObject.responseType ?? 'blob'; |
| 666 | env.fetcher(apiObject, ctx, { |
| 667 | responseType: 'blob' |
| 668 | }); |
| 669 | } |
| 670 | } |
| 671 | } |
| 672 | |
| 673 | handleSelect() { |
| 674 | const {disabled, multiple, maxLength, static: isStatic} = this.props; |
no test coverage detected