You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to resize a box by like the following code, but it was not working.
importblessedfrom'blessed';importReact,{Component}from'react';import{render}from'react-blessed';constscreen=blessed.screen({debug: true,smartCSR: true,});screen.key(['escape','C-c'],function(ch,key){returnprocess.exit(0);});classRootextendsComponent{constructor(){super();this.state={top: 0,left: 0,width: 2,height: 1,};}componentDidMount(){setInterval(()=>{this.setState({// top and left are applied ..top: this.state.top+1,left: this.state.left+1,// .. but width and height are not appliedwidth: this.state.width+1,height: this.state.height+1,});},1000);}render(){letboxProps=Object.assign({style: {fg: 'white',bg: 'magenta',},},this.state);return(<box{...{top: 0,left: 0,width: 40,height: 20,style: {fg: 'white',bg: 'blue',},}}><box{...boxProps}/></box>);}}render(<Root/>,screen);
Hello @kjirou. You are right indeed, I forgot bot width and height in RAW_ATTRIBUTES. Do you want to make a pull request with the needed changes, or should I add them?
Hello.
I tried to resize a box by like the following code, but it was not working.
So I added
width
andheight
toRAW_ATTRIBUTES
(https://github.com/Yomguithereal/react-blessed/blob/master/src/update.js#L9), then it seemed to have moved.Is this change wrong?
Environments:
The text was updated successfully, but these errors were encountered: