Skip to content

Commit

Permalink
chore: Remove one click binding
Browse files Browse the repository at this point in the history
  • Loading branch information
hetunandu committed Dec 4, 2024
1 parent 8df1849 commit 5482fa0
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 29 deletions.
33 changes: 11 additions & 22 deletions app/client/src/widgets/ConnectDataOverlay.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import { Colors } from "constants/Colors";

import { Button } from "@appsmith/ads";
// import { Button } from "@appsmith/ads";
import React from "react";
import styled from "styled-components";

Expand Down Expand Up @@ -31,40 +29,31 @@ const Container = styled.div`
`;

const Header = styled.div`
font-weight: 600;
font-size: 16px;
line-height: 24px;
color: ${Colors.GREY_900};
margin-bottom: 12px;
font-weight: 400;
font-size: 14px;
line-height: 19.6px;
color: var(--ads-v2-color-gray-500);
`;

const ConnecData = styled(Button)`
margin-bottom: 16px;
`;
// const ConnecData = styled(Button)`
// margin-bottom: 16px;
// `;

export function ConnectDataOverlay(props: {
onConnectData: () => void;
message: string;
btnText: string;
}) {
const onClick = () => {
props.onConnectData();
};
// const onClick = () => {
// props.onConnectData();
// };

return (
<Wrapper>
<Container>
<Header className="t--cypress-table-overlay-header">
{props.message}
</Header>
<ConnecData
className="t--cypress-table-overlay-connectdata"
id={"table-overlay-connectdata"}
onClick={onClick}
size="md"
>
{props.btnText}
</ConnecData>
</Container>
</Wrapper>
);
Expand Down
5 changes: 3 additions & 2 deletions app/client/src/widgets/MultiSelectWidgetV2/widget/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ class MultiSelectWidget extends BaseWidget<
"Takes in an array of objects to display options. Bind data from an API using {{}}",
propertyName: "sourceData",
label: "Source Data",
controlType: "ONE_CLICK_BINDING_CONTROL",
controlType: "INPUT_TEXT",
controlConfig: {
aliases: [
{
Expand All @@ -260,7 +260,6 @@ class MultiSelectWidget extends BaseWidget<
2,
),
},
isJSConvertible: true,
placeholderText: '[{ "label": "Option1", "value": "Option2" }]',
isBindProperty: true,
isTriggerProperty: false,
Expand Down Expand Up @@ -953,10 +952,12 @@ class MultiSelectWidget extends BaseWidget<
}
};
}

export interface OptionValue {
label: string;
value: string;
}

export interface DropdownOption extends OptionValue {
disabled?: boolean;
}
Expand Down
4 changes: 2 additions & 2 deletions app/client/src/widgets/SelectWidget/widget/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ class SelectWidget extends BaseWidget<SelectWidgetProps, WidgetState> {
constructor(props: SelectWidgetProps) {
super(props);
}

static type = "SELECT_WIDGET";

static getConfig() {
Expand Down Expand Up @@ -259,7 +260,7 @@ class SelectWidget extends BaseWidget<SelectWidgetProps, WidgetState> {
"Takes in an array of objects to display options. Bind data from an API using {{}}",
propertyName: "sourceData",
label: "Source Data",
controlType: "ONE_CLICK_BINDING_CONTROL",
controlType: "INPUT_TEXT",
controlConfig: {
aliases: [
{
Expand All @@ -282,7 +283,6 @@ class SelectWidget extends BaseWidget<SelectWidgetProps, WidgetState> {
2,
),
},
isJSConvertible: true,
placeholderText: '[{ "label": "label1", "value": "value1" }]',
isBindProperty: true,
isTriggerProperty: false,
Expand Down
2 changes: 1 addition & 1 deletion app/client/src/widgets/TableWidgetV2/constants/messages.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// Table widget
export const TABLE_CONNECT_OVERLAY_TEXT = () =>
"Connect your data or use sample data to display table";
"Connect your data with a single JS line e.g. {{query1.data}}";
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,14 @@ export default [
"Takes in an array of objects to display rows in the table. Bind data from an API using {{}}",
propertyName: "tableData",
label: "Table data",
controlType: "ONE_CLICK_BINDING_CONTROL",
controlType: "INPUT_TEXT",
controlConfig: {
searchableColumn: true,
},
placeholderText: '[{ "name": "John" }]',
inputType: "ARRAY",
isBindProperty: true,
isTriggerProperty: false,
isJSConvertible: true,
validation: {
type: ValidationTypes.FUNCTION,
params: {
Expand Down

0 comments on commit 5482fa0

Please sign in to comment.