leefsmp/Re-Flex

Question: How to disable the ReflexSplitter?

Closed this issue · 2 comments

I am using some custom buttons that I pass as the children of the ReflexSplitter as shown below

<ReflexSplitter>
  <SplitterButtons />
</reflexSplitter>

I want to have a scenario where the users cannot drag the Divider but they can control the layout via the buttons. How can I achieve this?

I tried to make the pointer-events property of the reflex-splitter as none but that also prevents hover. Any workaround for the same? @leefsmp

I can't think of a workaround, using a splitter and making it unusable by users defeats the purpose. In such scenario you should not use a splitter at all and control the layout with programming logic. There are examples of that in the demos.

It should be possible to add an enabled property on the splitter and some associated logic in the code but I find it counter intuitive, if you see a splitter in the UI it's to be able to use it, if you don't want users to use the splitter simply remove it from the components hierarchy so it's not controversial from user POV.

closing as out of scope