Server-side Cascading SearchPanes don't cascade

Server-side Cascading SearchPanes don't cascade

dgruskadgruska Posts: 27Questions: 8Answers: 0

Thank you for the SearchPanes 2.0.0 and Editor 2.0.7 update. Now I am able to re-select an existing item. But, now the Panes don't self-limit. I believe this is set up correctly:

                                "searchPanes": {
                                    cascadePanes: true,
                                    clear: true,
                                    orderable: false,
                                    layout: 'columns-1',
                                    controls: false,
                                    columns: [1,2,3,4,5,6,7,8,9,10]
                                }

Debug code:
ulegek

Please let me know if you need more information.

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    I'm not clear what you mean by "self-limit", I'm afraid. The searchPanes.cascadePanes appears to work as expected here - could you take a look, please, and see if that helps and whether your issue is present on that example too,

    Colin

  • dgruskadgruska Posts: 27Questions: 8Answers: 0

    Hi colin,
    The example does work, so it's most likely an issue with my setup.
    Sorry, by "self-limit", I meant that when you select one option, the other options limit themselves to what's available. So, in the example, if you pick "Basia" as the first name, last name is automatically limited to "Harrell". In my code, all the other options are still available, and if you select a different option than what's available, you get 0 records.

  • allanallan Posts: 63,489Questions: 1Answers: 10,470 Site admin

    What are you using on the server-side for to perform the server-side processing?

    Allan

  • dgruskadgruska Posts: 27Questions: 8Answers: 0

    Node w/ Editor 2.0.7.

    Here is the endpoint:

                router.all('(/*)', async function (req, res) {
                    let editor = new Editor(db, 'v_powerfeedthroughselectionguidedata', 'v_powerfeedthroughselectionguidedata.id')
                        .fields(
                            new Field('PARTNO'),
                            new Field('DISPLAYORDER'),
                            new Field('DIMA_MM'),
                            new Field('DIMB_MM'),
                            new Field('DIMC_MM'),
                            new Field('DIMD_MM'),
                            new Field('DIME_MM'),
                            new Field('DIMF_MM'),
                            new Field('DIMG_MM'),
                            new Field('PINSIZE_MM'),
                            new Field('LENGTH_MM'),
                            new Field('WELDLIPDIAMETER_MM'),
                            new Field('WELDLIPTHICKNESS_MM'),
                            new Field('CONDUCTORDIAMETER_MM'),
                            new Field('WIRESIZE_MM'),
                            new Field('OUTERDIAMETER_MM'),
                            new Field('MATINGPINSIZE_MM'),
                            new Field('CABLETHICKNESS_MM'),
                            new Field('CABLEWIDTH_MM'),
                            new Field('IMAGEURL'),
                            new Field('ISDYNAMICSVG'),
                            new Field('ICONURL'),
                            new Field('REGIONLIST'),
                            new Field('ACTIVE'),
                            new Field('VOLTAGE'),
                            new Field('AMPS').searchPaneOptions(new SearchPaneOptions()),
                            new Field('AMPSPLUG').searchPaneOptions(new SearchPaneOptions()),
                            new Field('POWER'),
                            new Field('FREQUENCYKHZ'),
                            new Field('FREQUENCYMHZ'),
                            new Field('NUMOFCONDUCTOR').searchPaneOptions(new SearchPaneOptions()),
                            new Field('CONDUCTORMATERIAL').searchPaneOptions(new SearchPaneOptions()),
                            new Field('CONDUCTORDIAMETER').searchPaneOptions(new SearchPaneOptions()),
                            new Field('STYLE').searchPaneOptions(new SearchPaneOptions()),
                            new Field('CONDUCTORTHREAD'),
                            new Field('AIRSIDE'),
                            new Field('VACSIDE'),
                            new Field('SHIELD'),
                            new Field('WELDLIPDIAMETER'),
                            new Field('WELDLIPTHICKNESS'),
                            new Field('WELDLIPMATERIAL'),
                            new Field('INSULATORMATERIAL'),
                            new Field('VOLTAGEPINTOPINKV'),
                            new Field('FTCATEGORY'),
                            new Field('FTSUBCATEGORY'),
                            new Field('ONHAND'),
                            new Field('ONHANDUK'),
                            new Field('HASDXFFILE'),
                            new Field('HASSTPFILE'),
                            new Field('HASPDFFILE'),
                            new Field('PAGESRELATIONTYPE'),
                            new Field('HASSEOURLS'),
                            new Field('PAGENAME'),
                            new Field('HASPARTPAGES'),
                            new Field('NOTE'),
                            new Field('VOLTAGEKV').searchPaneOptions(new SearchPaneOptions()),
                            new Field('VOLTAGEKVPLUG').searchPaneOptions(new SearchPaneOptions())
                    ).write(false);
    
                    await editor.process(req.body);
                    res.json(editor.data());
                });
    
  • allanallan Posts: 63,489Questions: 1Answers: 10,470 Site admin

    The example on our site uses PHP as the back end, but I've just tried this locally with NodeJS, using also your configuration from above, and it does seem to be working as expected:

    Click on first name:

    Have you updated your Editor server-side libraries as well as the client-side? You can check in node_modules/datatables.net-editor-server/package.json and check that the version is 2.0.7.

    Regards,
    Allan

  • dgruskadgruska Posts: 27Questions: 8Answers: 0

    Hi Allan,
    It's the latest version on the server side. On the client side, I am using the following, which appears to be the latest as well:

    DataTables-1.11.5
    Responsive-2.2.9
    SearchPanes-2.0.0
    Select-1.3.4

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Odd, we are struggling to reproduce this. Are you able to link to your page, please, so we can take a look?

    Colin

  • dgruskadgruska Posts: 27Questions: 8Answers: 0

    I'm not easily able to do this. The code isn't live, and we don't even currently use Node on our live site. I could potentially orphan this on our live site if I could find a free Node host, but this would be tricky as well, as we have a lot of supporting custom libraries that were updated for this project that would need to be duplicated and orphaned as well.

    Are you able to do a Teams/Zoom/Skype call? My company does have premium DataTables support.

  • allanallan Posts: 63,489Questions: 1Answers: 10,470 Site admin

    Hi,

    Yes, could you drop me an e-mail with your timezone please? allan @ this domain.net.

    One other thing that might give us a clue - could you enable the debug option for knex in your Editor NodeJS install? That will dump a ton of SQL debug information to the console when you are running the node program and interact with the table. If you could send me a sample of that, it might provide some insight.

    Thanks,
    Allan

  • dgruskadgruska Posts: 27Questions: 8Answers: 0

    This is tricky, as I'm using IISNode that has no console, as far as I am aware.

    Is there a way to pipe the data to the returned JSON instead? If not, I can probably get a regular install of Node working and hook the project up to that temporarily so I can get the debug info for you.

  • allanallan Posts: 63,489Questions: 1Answers: 10,470 Site admin

    I haven't used IISNode myself, but this thread might be of some use to getting logging information out of it.

    Allan

Sign In or Register to comment.