Do not leave unused input pins of CMOS logic IC floating and connect them to VCC or GND as shown in Fig. 1. In the floating state, unexpected output or oscillation may occur due to disturbance noise, etc.
The bus pins (I/O pins) of 74xxx245 and other bidirectional bus buffers are floating when /G pin is set to High. When /G pin is High, connect the bus/output pin to VCC or GND with a resistor as shown in Fig. 2.
In addition, do not apply an external signal when the bus pin is in output mode.
Products with a bus-hold function (such as 74VCXH) do not require an external pull-up or pull-down resistor.
Please refer to here for bus hold.
FAQ: What is bushold of the general-purpose logic ICs?
The following documents also contain related information.