Skip to content

Commit d010978

Browse files
committed
updated search filter
1 parent 1ba9c8a commit d010978

File tree

1 file changed

+10
-16
lines changed

1 file changed

+10
-16
lines changed

src/app/components/LinkControls.tsx

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ type Props = {
3333
const nodeList = [];
3434

3535
const collectNodes = (node) => {
36-
nodeList.splice(0, nodeList.length);
36+
console.log("This is the root node", node);
37+
nodeList.splice(0, nodeList.length); { /* We used the .splice method here to ensure that nodeList did not accumulate with page refreshes */ }
3738
nodeList.push(node);
3839
for (let i = 0; i < nodeList.length; i++) {
3940
const cur = nodeList[i];
@@ -44,7 +45,6 @@ const collectNodes = (node) => {
4445
}
4546
}
4647
console.log('NODELIST looks like: ', nodeList);
47-
4848
}
4949

5050
export default function LinkControls({
@@ -72,7 +72,7 @@ export default function LinkControls({
7272
<select
7373
onClick={e => e.stopPropagation()}
7474
onChange={e => setLayout(e.target.value)}
75-
value={layout}
75+
// value={layout}
7676
style={dropDownStyle}
7777
>
7878
<option value="cartesian">Cartesian</option>
@@ -86,7 +86,7 @@ export default function LinkControls({
8686
<select
8787
onClick={e => e.stopPropagation()}
8888
onChange={e => setOrientation(e.target.value)}
89-
value={orientation}
89+
// value={orientation}/
9090
disabled={layout === 'polar'}
9191
style={dropDownStyle}
9292
>
@@ -101,7 +101,7 @@ export default function LinkControls({
101101
<select
102102
onClick={e => e.stopPropagation()}
103103
onChange={e => setLinkType(e.target.value)}
104-
value={linkType}
104+
// value={linkType}
105105
style={dropDownStyle}
106106
>
107107
<option value="diagonal">Diagonal</option>
@@ -111,23 +111,17 @@ export default function LinkControls({
111111

112112
{/* Controls for the select selections. */}
113113
<label>Select:</label>
114-
&nbsp;
115-
<select
116-
onClick={e => e.stopPropagation()}
114+
&nbsp; {/*This is a non-breaking space - Prevents an automatic line break at this position */}
115+
<input list='nodeOptions' type='text' name="nodeOptions"
117116
onChange={e => {
118-
const val = e.target.value;
119-
console.log("You selected: ", val);
120117
setSelectedNode(e.target.value)
121118
}}
122-
value={selectedNode}
123-
style={dropDownStyle}
124-
>
125-
{console.log("snapShots: ", snapShots)}
126-
119+
/>
120+
<datalist id='nodeOptions'>
127121
{nodeList.map(node => (
128122
<option value={node.name}>{node.name}</option>
129123
))}
130-
</select>
124+
</datalist>
131125

132126
{/* This is the slider control for the step option */}
133127
{linkType === 'step' && layout !== 'polar' && (

0 commit comments

Comments
 (0)