Giter VIP home page Giter VIP logo

Comments (3)

chris-cooper avatar chris-cooper commented on May 31, 2024 10

In case it's of interest I was able to do this by adding the following css...

div.SplitPane.soloPane1.vertical > .Pane2,
div.SplitPane.soloPane2.vertical > .Pane1 {
    width: 0px !important;
}

div.SplitPane.soloPane1.vertical > .Pane1,
div.SplitPane.soloPane2.vertical > .Pane2 {
    width: 100% !important;
}

div.SplitPane.soloPane1.horizontal > .Pane2,
div.SplitPane.soloPane2.horizontal > .Pane1 {
    height: 0px !important;
}

div.SplitPane.soloPane1.horizontal > .Pane1,
div.SplitPane.soloPane2.horizontal > .Pane2 {
    height: 100% !important;
}

You can then add a class to your SplitPane...

<SplitPane className="soloPane1">

This is isolated to the immediate descendent panes due to the selector > so allows individual control when nesting panes.

from react-split-pane.

mathew-kurian avatar mathew-kurian commented on May 31, 2024

Lazy loading hidden tabs would be interesting @tomkp

from react-split-pane.

bburns avatar bburns commented on May 31, 2024

Here's how I'm toggling a pane on/off with version 2 and React - when it's at 0 width the slider is still grabbable on the right side of the screen. toggleSidebar is called from a button.

  const [showSidebar, setShowSidebar] = React.useState(false)
  function toggleSidebar() {
    setShowSidebar(!showSidebar)
  }

...

      <SplitPane>
        <div className="ag-theme-balham">
          <AgGridReact
            {...grid.options}
            rowData={filtered}
            onGridReady={onGridReady}
            onCellFocused={onCellFocused}
          >
          </AgGridReact>
        </div>
        <Pane initialSize={showSidebar ? "20%" : "0"}>
          <table className="row">
            <tbody>
              {row && row.type && fieldsByType[row.type].map(field => (
                <tr>
                  <td className="field">{toTitleCase(field)}</td>
                  <td className="value">{row[field]}</td>
                </tr>
              ))}
            </tbody>
          </table>
        </Pane>
      </SplitPane>

from react-split-pane.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.