Merge branch 'fix/url-params-sync' into 'release'

Fix url params sync issue

See merge request theappsmith/internal-tools-client!226
This commit is contained in:
Hetu Nandu 2020-01-08 09:19:00 +00:00
commit bf317e652e
3 changed files with 11 additions and 6 deletions

View File

@ -99,7 +99,7 @@ const IconContainer = styled.div`
.bp3-icon {
border-radius: 4px 0 0 4px;
margin: 0;
height: 32px;
height: 30px;
width: 30px;
display: flex;
align-items: center;
@ -166,7 +166,7 @@ class DynamicAutocompleteInput extends Component<Props> {
extraKeys,
...options,
});
this.editor.on("change", _.debounce(this.handleChange, 200));
this.editor.on("change", _.debounce(this.handleChange, 100));
this.editor.on("cursorActivity", this.handleAutocompleteVisibility);
this.editor.setOption("hintOptions", {
completeSingle: false,
@ -187,15 +187,17 @@ class DynamicAutocompleteInput extends Component<Props> {
inputValue = JSON.stringify(inputValue, null, 2);
}
if ((!!inputValue || inputValue === "") && inputValue !== editorValue) {
const cursor = this.editor.getCursor();
this.editor.setValue(inputValue);
this.editor.setCursor(this.editor.lineCount(), 0);
this.editor.setCursor(cursor);
}
}
}
handleChange = () => {
const value = this.editor.getValue();
if (this.props.input.onChange) {
const inputValue = this.props.input.value;
if (this.props.input.onChange && value !== inputValue) {
this.props.input.onChange(value);
}
this.editor.eachLine(this.highlightBindings);

View File

@ -8,7 +8,7 @@ export default styled.div`
left: 0;
background-color: rgba(255, 255, 255, 0.6);
pointer-events: none;
z-index: 1;
z-index: 10;
color: black;
display: flex;
align-items: center;

View File

@ -2,7 +2,10 @@ import { RestAction } from "api/ActionAPI";
export const transformRestAction = (data: RestAction): RestAction => {
let action = { ...data };
if (data.pluginType === "API") {
if (
data.actionConfiguration.queryParameters &&
data.actionConfiguration.queryParameters.length
) {
const path = data.actionConfiguration.path;
if (path && path.indexOf("?") > -1) {
action = {