Automatically filtler out optional parameters from uri
Summary: When a user enters a uri with optional parameters in the nav bar, I chose to automatically filter these out, yet still show the parameters in the nav bar. The device receive uri's with no optional parameters, but the user will still see the parameters in the UI. Reviewed By: danielbuechele Differential Revision: D16762529 fbshipit-source-id: e3bbdf886dca7fba793b140b5fb303c4a77926ba
This commit is contained in:
committed by
Facebook Github Bot
parent
9c80021d7c
commit
c4a89da960
@@ -26,7 +26,7 @@ import {
|
||||
DefaultProvider,
|
||||
} from './util/autoCompleteProvider';
|
||||
import {getAppMatchPatterns} from './util/appMatchPatterns';
|
||||
import {getRequiredParameters} from './util/uri';
|
||||
import {getRequiredParameters, filterOptionalParameters} from './util/uri';
|
||||
|
||||
import type {
|
||||
State,
|
||||
@@ -114,7 +114,7 @@ export default class extends FlipperPlugin<State, {}, PersistedState> {
|
||||
const requiredParameters = getRequiredParameters(query);
|
||||
if (requiredParameters.length === 0) {
|
||||
this.getDevice().then(device => {
|
||||
device.navigateToLocation(query);
|
||||
device.navigateToLocation(filterOptionalParameters(query));
|
||||
});
|
||||
} else {
|
||||
this.setState({
|
||||
|
||||
Reference in New Issue
Block a user