react-onclickoutside icon indicating copy to clipboard operation
react-onclickoutside copied to clipboard

onClickOutside decorator get static methods

Open ButuzGOL opened this issue 6 years ago • 7 comments

Any way to get onClickOutside decorator get static methods ? I have exp with autobind decorator and it works fine with static

ButuzGOL avatar Jan 17 '18 09:01 ButuzGOL

Im not sure if I understand what do you mean, could you please give an example code snippet with the expected behaviour explained?

Andarist avatar Jan 17 '18 12:01 Andarist

@onClickOutside
class Abc {
  static getMeSomething() {}
}

in this case Abc.getMeSomething undefined

ButuzGOL avatar Jan 17 '18 12:01 ButuzGOL

I guess it would require using hoist-non-react-statics

Andarist avatar Jan 17 '18 12:01 Andarist

but is it should be done on onClickOutside lib side ?

ButuzGOL avatar Jan 17 '18 12:01 ButuzGOL

yeah

Andarist avatar Jan 17 '18 13:01 Andarist

@Andarist Hello, don't you mind if i create PR adding hoist-non-react-statics as library's pear dependency?

todesstoss avatar Apr 17 '19 09:04 todesstoss

What would be the benefit of static methods, and which ones are you thinking of? (e.g. what use case would be enabled by adding them).

Pomax avatar Jun 20 '19 20:06 Pomax