Skip to content
This repository has been archived by the owner on Dec 5, 2020. It is now read-only.

How to Refresh the Tags? #12

Open
DavidRajPaul opened this issue Oct 2, 2018 · 2 comments
Open

How to Refresh the Tags? #12

DavidRajPaul opened this issue Oct 2, 2018 · 2 comments

Comments

@DavidRajPaul
Copy link

Reloading the list Does not clear the seleted Tag Item. Is there a way to clear all selected Tags?

@himanshuNetsol
Copy link

Do it like this:

<TagSelect
data={this.state.categories}
value={this.state.preSelectedCategories}
ref={(tag) => {
this.tag = tag;
}}
/>

On Clear Btn Tap:

_clearAllFeeds = () => {
debugger
const value = {}
this.tag.setState({ value })
}

@ankitjaiswal1994
Copy link

For the folks doing functional programming,

  const ref = useRef<TagSelect>();

          <TagSelect
            ref={ref}
            data={data}
          />

then do this on onClear function of yours:

  ref.current.setState({ value: {} });

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants