Skip to content

Commit

Permalink
ability to call a number
Browse files Browse the repository at this point in the history
  • Loading branch information
Clément OLIVIER committed Sep 1, 2020
1 parent 98217b3 commit 47cfd2f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest>
<control namespace="Carfup" constructor="AnyCompositeFIelds" version="0.0.74" display-name-key="Carfup.AnyCompositeFIelds" description-key="AnyCompositeFIelds will allow you to display any stack of fields as composite rendering." control-type="standard" preview-image="img/preview.png">
<control namespace="Carfup" constructor="AnyCompositeFIelds" version="0.0.75" display-name-key="Carfup.AnyCompositeFIelds" description-key="AnyCompositeFIelds will allow you to display any stack of fields as composite rendering." control-type="standard" preview-image="img/preview.png">
<!-- property node identifies a specific, configurable piece of data that the control expects from CDS -->
<property name="FieldToAttachControl" display-name-key="FieldToAttachControl" description-key="Field to attach the control to" of-type-group="strings" usage="bound" required="true" />
<property name="separator" display-name-key="Values separator" description-key="Separator to split the mapped values (for a space, put %20)" of-type="SingleLine.Text" usage="input" required="true" default-value="%20" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export default class CompositeControl extends React.Component<ICompositeControlP
{this.state.showCallout && (
<Callout
target={"#acf_compositeFullValue"+this.props.randNumber}
onDismiss={() => this.setState({ showCallout : false }) }
onDismiss={this.onDismissCallout}
styles={calloutStyles}
directionalHint={DirectionalHint.topCenter}
>
Expand Down Expand Up @@ -91,6 +91,12 @@ export default class CompositeControl extends React.Component<ICompositeControlP
);
}

private onDismissCallout = (ev?: any) : void => {
if(this.props.context?.client.getClient() !== "Mobile"){
this.setState({ showCallout : false });
}
}

private onChangeField = (event: React.FormEvent<HTMLInputElement | HTMLTextAreaElement>, newValue?: string | undefined) : void => {
// @ts-ignore
let target = event.target.id.replace('acf_', '');
Expand Down Expand Up @@ -130,6 +136,7 @@ export default class CompositeControl extends React.Component<ICompositeControlP
name : contextInfo.entityRecordName
}
});
this.setState({showCallout : false});
break;
case "SingleLine.URL":
// @ts-ignore
Expand Down

0 comments on commit 47cfd2f

Please sign in to comment.