BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
Hi, I prepare a sample in attachment. The page contains:
- a label displays value of enabled prop.
- an EJ dropdownlist
- a button that toggles enabled prop.
When you click the button, and look at the label, you can see that the enabled prop is changed. But the dropdownlist is not disabled/enabled based on the prop change. Please see my video: https://www.screencast.com/t/8dGt7J65V
class Select extends React.Component<SelectProps, void> {
constructor(props) {
super(props);
}
public render() {
return <EJ.DropDownList id="dropdown" dataSource={this.props.options} fields={{ value: "key", text: "label" }} value={this.props.value} enabled={this.props.enabled} />;
}
componentDidUpdate() {
var obj = $("#dropdown").data("ejDropDownList");
obj.disable();
}
} |
Hi,
As I mentioned above, I don't want to use ID attribute. Is there any other way?
Thanks.
var obj = $(".e-dropdownlist").data("ejDropDownList");
obj.disable();
|
public render() {
return <EJ.DropDownList dataSource={this.props.options} fields={{ value: "key", text: "label" }}value={this.props.value} enabled={this.props.enabled} cssClass="myclass" />;
}
componentDidUpdate() {
var obj = $(".myclass .e-dropdownlist").data("ejDropDownList");
obj.disable();
}
|