Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Can options be controlled? #676

Open
QZWQWQ opened this issue Dec 9, 2021 · 0 comments
Open

[Bug] Can options be controlled? #676

QZWQWQ opened this issue Dec 9, 2021 · 0 comments

Comments

@QZWQWQ
Copy link

QZWQWQ commented Dec 9, 2021

I see All demos's options config is static,when options change,my components cleave can not monitor this change。

( cleaveOptions may change , the first cleaveOptions is {
time: true,
timePattern:['h', 'm'],
},
when it changes to {
time: true,
timePattern:['h', 'm', 's'],
}
cleave cannot monitor this change
)

my code here:

const { cleaveOptions } = this.props
render(){
<Cleave
weId={${this.props.weId || ''}_fqke2f}
{...restProps}
readOnly={inputReadOnly || readOnly}
type={type}
className={cls}
value={mergedValue}
// onInit={this.setCleaveRef}
options={cleaveOptions}
// ref={this.saveCleaveInput}
htmlRef={this.saveInput}
onFocus={this.handleFocus}
onBlur={this.handleBlur}
onKeyDown={this.handleKeyDown}
onChange={this.handleChange}
onCompositionStart={this.handleCompositionStart}
onCompositionEnd={this.handleCompositionEnd}
/>
}

@QZWQWQ QZWQWQ changed the title Can options be controlled? [Bug] Can options be controlled? Dec 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant